Regularized Regression Model Constructor
Definition
Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Overload List
Regularized | Constructs a new LinearRegressionModel. |
Regularized | Constructs a new RegularizedRegressionModel. |
Regularized | Constructs a new RegularizedRegressionModel. |
Regularized | Constructs a new SimpleRegressionModel. |
Regularized | Initializes a new instance of the RegularizedRegressionModel class |
RegularizedRegressionModel(IDataFrame, String)
Constructs a new LinearRegressionModel.
public RegularizedRegressionModel(
IDataFrame dataFrame,
string formula
)
Parameters
- dataFrame IDataFrame
- A IDataFrame containing the data for the regression.
- formula String
- A formula that specifies the variables in the model.
Exceptions
Format | The formula is not in the correct format. |
RegularizedRegressionModel(Vector<Double>, Vector<Double>[])
Constructs a new RegularizedRegressionModel.
public RegularizedRegressionModel(
Vector<double> dependentVariable,
params Vector<double>[] independentVariables
)
Parameters
Exceptions
Argument | dependentVariable is null. |
RegularizedRegressionModel(IDataFrame, String, String[])
Constructs a new RegularizedRegressionModel.
public RegularizedRegressionModel(
IDataFrame dataFrame,
string dependentVariable,
params string[] independentVariables
)
Parameters
- dataFrame IDataFrame
- A data frame containing the data for the regression.
- dependentVariable String
- The name of the dependent variable.
- independentVariables String[]
- An array containing the names of the independent variables.
RegularizedRegressionModel(Vector<Double>, Matrix<Double>, Boolean, Vector<Double>)
Constructs a new SimpleRegressionModel.
public RegularizedRegressionModel(
Vector<double> dependentData,
Matrix<double> independentData,
bool noIntercept = false,
Vector<double>? weightData = null
)
Parameters
- dependentData Vector<Double>
- A vector that contains the data for the dependent variable.
- independentData Matrix<Double>
- A matrix that contains the data for the independent variable.
- noIntercept Boolean (Optional)
- Specifies whether the intercept (constant) term should be omitted from the model.
- weightData Vector<Double> (Optional)
- (Optional.) A vector that contains the weight for each observation.
Remarks
Each column of independentData corresponds to an independent variable.
Exceptions
Argument | dependentData is null.
independentData is null. |
Dimension | The number of rows of independentData is not equal to the length of dependentData. |
RegularizedRegressionModel(IDataFrame, String, String[], Boolean, String)
Initializes a new instance of the RegularizedRegressionModel class
public RegularizedRegressionModel(
IDataFrame dataFrame,
string dependentVariable,
string[] independentVariables,
bool noIntercept = false,
string? weightVariable = null
)
Parameters
- dataFrame IDataFrame
- A IDataFrame containing the data for the regression.
- dependentVariable String
- The name of the dependent variable.
- independentVariables String[]
- An array containing the names of the independent variables.
- noIntercept Boolean (Optional)
- Indicates whether a constant term should be excluded from the model. The default is false.
- weightVariable String (Optional)
- The name of the variable that contains the case weights. May be null.
Exceptions
Argument | dataFrame is null. -or- dependentVariable is null. -or- independentVariables is null. |