Constructs a LinearRegression instance with the specifed regresssion data and an index to the observation column, optionally adding an intercept parameter. The model parameter values are computed using the specified regression calculator.

Namespace:  CenterSpace.NMath.Stats
Assembly:  NMathStats (in NMathStats.dll) Version: 3.4.0.0

Syntax

C#
public LinearRegression(
	DataFrame data,
	int observationIndex,
	bool addIntercept,
	IRegressionCalculation regressionCalculator
)
Visual Basic (Declaration)
Public Sub New ( _
	data As DataFrame, _
	observationIndex As Integer, _
	addIntercept As Boolean, _
	regressionCalculator As IRegressionCalculation _
)
Visual C++
public:
LinearRegression(
	DataFrame^ data, 
	int observationIndex, 
	bool addIntercept, 
	IRegressionCalculation^ regressionCalculator
)

Parameters

data
Type: CenterSpace.NMath.Stats..::.DataFrame
Regression data.
observationIndex
Type: System..::.Int32
Index of column of observations.
addIntercept
Type: System..::.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
Type: CenterSpace.NMath.Stats..::.IRegressionCalculation
A regression calculation object. Must implement the IRegressionCalculation interface.

See Also