| DoubleLeastSquares(DoubleMatrix, DoubleVector, 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.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax public DoubleLeastSquares(
DoubleMatrix A,
DoubleVector y,
bool addIntercept
)
Public Sub New (
A As DoubleMatrix,
y As DoubleVector,
addIntercept As Boolean
)
public:
DoubleLeastSquares(
DoubleMatrix^ A,
DoubleVector^ y,
bool addIntercept
)
new :
A : DoubleMatrix *
y : DoubleVector *
addIntercept : bool -> DoubleLeastSquares
Parameters
- A DoubleMatrix
- The matrix.
- y DoubleVector
- 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 See Also