Click or drag to resize

LinearRegression(DoubleMatrix, DoubleVector, Boolean) Constructor

Constructs a LinearRegression instance with the specifed regresssion matrix and observation vector, optionally adding an intercept parameter. By default, the model parameter values are computed using a QR factorization.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public LinearRegression(
	DoubleMatrix A,
	DoubleVector obs,
	bool addIntercept
)

Parameters

A  DoubleMatrix
A regression matrix.
obs  DoubleVector
A vector of observations.
addIntercept  Boolean
If true, a column of ones is prepended onto the data in the regression matrix A, thus adding an intercept to the model. If false, the data in the regression matrix is used as given.
Exceptions
ExceptionCondition
MismatchedSizeExceptionThrown if the number of rows in the regression matrix is not equal to the length of the observation vector.
See Also