Click or drag to resize

DoubleComplexLeastSquares(DoubleComplexMatrix, DoubleComplexVector, Boolean) Constructor

Constructs a least squares solution for the given linear system Ax = y, optionally adding an intercept parameter to the model.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public DoubleComplexLeastSquares(
	DoubleComplexMatrix A,
	DoubleComplexVector y,
	bool addIntercept
)

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.
Exceptions
ExceptionCondition
MismatchedSizeExceptionThrown if the number of rows in A is not equal to the length of y.
InvalidArgumentExceptionIf any entries in the matrix are NaN.
See Also