| DoubleComplexLeastSquares(DoubleComplexMatrix, DoubleComplexVector, Boolean, Double) Constructor |
Constructs a least squares solution for the given linear system
Ax = y, optionally adding an intercept parameter, and using
the specified tolerance to compute the effective rank.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax public DoubleComplexLeastSquares(
DoubleComplexMatrix A,
DoubleComplexVector y,
bool addIntercept,
double tolerance
)
Public Sub New (
A As DoubleComplexMatrix,
y As DoubleComplexVector,
addIntercept As Boolean,
tolerance As Double
)
public:
DoubleComplexLeastSquares(
DoubleComplexMatrix^ A,
DoubleComplexVector^ y,
bool addIntercept,
double tolerance
)
new :
A : DoubleComplexMatrix *
y : DoubleComplexVector *
addIntercept : bool *
tolerance : float -> DoubleComplexLeastSquares
Parameters
- A DoubleComplexMatrix
- The matrix.
- y DoubleComplexVector
- The right hand side.
- addIntercept Boolean
- If true, a column of ones is prepended to
a deep copy of matrix A before solving for the least squares solution.
This corresponds to adding an intercept parameter to the model. Note: the
input matrix A is not changed.
- tolerance Double
- Tolerance used to compute the effective rank
of A The effective rank of A is defined as the order of the
largest leading submatrix, R11, in the QR factorization with pivoting of A,
whose estimated condition number is less than 1/tolerance.
Exceptions Remarks
The effective rank of A is determined by treating as zero
those singular values that are less than tolerance times the largest
singular value.
See Also