| LinearRegression(DataFrame, IDFColumn, Boolean, IRegressionCalculation) Constructor |
Constructs a LinearRegression instance with the specifed regresssion data
and observation column, optionally adding an intercept parameter. The
model parameter values are computed using the specified regression calculator.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax public LinearRegression(
DataFrame data,
IDFColumn observations,
bool addIntercept,
IRegressionCalculation regressionCalculator
)
Public Sub New (
data As DataFrame,
observations As IDFColumn,
addIntercept As Boolean,
regressionCalculator As IRegressionCalculation
)
public:
LinearRegression(
DataFrame^ data,
IDFColumn^ observations,
bool addIntercept,
IRegressionCalculation^ regressionCalculator
)
new :
data : DataFrame *
observations : IDFColumn *
addIntercept : bool *
regressionCalculator : IRegressionCalculation -> LinearRegression
Parameters
- data DataFrame
- Regression data.
- observations IDFColumn
- Column of observations.
- addIntercept Boolean
- If true, a column of ones is prepended onto
the data in the regression data data, thus adding an intercept to
the model. If false, the data in the regression data is used as given.
- regressionCalculator IRegressionCalculation
- A regression calculation object. Must
implement the IRegressionCalculation interface.
Exceptions Exception | Condition |
---|
MismatchedSizeException | Thrown if the number of rows
in the regression matrix is not equal to the length of the observation
vector.
|
See Also