| FloatNonnegativeLeastSquares(FloatMatrix, FloatVector, Boolean) Constructor |
Constructs a nonnegative 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 FloatNonnegativeLeastSquares(
FloatMatrix A,
FloatVector y,
bool addIntercept
)
Public Sub New (
A As FloatMatrix,
y As FloatVector,
addIntercept As Boolean
)
public:
FloatNonnegativeLeastSquares(
FloatMatrix^ A,
FloatVector^ y,
bool addIntercept
)
new :
A : FloatMatrix *
y : FloatVector *
addIntercept : bool -> FloatNonnegativeLeastSquares
Parameters
- A FloatMatrix
- The matrix.
- y FloatVector
- 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 nonnegative least squares solution.
This corresponds to adding an intercept parameter to the model. Note: the
input matrix A is not changed.
Exceptions Exception | Condition |
---|
MismatchedSizeException | Thrown if the number of rows
in A is not equal to the length of y. |
NMathException | Thrown if the specified maximum number of
iterations performed by the algorithm was exceeded. |
See Also