Options¶
This section documents the options components of the linear_model module.
options
¶
Defines sklearn.linear_model options interoperability.
This module provides options for scikit-learn linear models to be used with Nextmv.
CLASS | DESCRIPTION |
---|---|
LinearRegressionOptions |
Options for the sklearn.linear_model.LinearRegression. |
Variables
LINEAR_REGRESSION_PARAMETERS : list List of parameters for LinearRegression.
LINEAR_REGRESSION_PARAMETERS
module-attribute
¶
LINEAR_REGRESSION_PARAMETERS = [
Option(
name="fit_intercept",
option_type=bool,
description="Whether to calculate the intercept for this model.",
),
Option(
name="copy_X",
option_type=bool,
description="If True, X will be copied; else, it may be overwritten.",
),
Option(
name="n_jobs",
option_type=int,
description="The number of jobs to use for the computation.",
),
Option(
name="positive",
option_type=bool,
description="When set to True, forces the coefficients to be positive.",
),
]
List of parameters for scikit-learn's LinearRegression model.
You can import LINEAR_REGRESSION_PARAMETERS directly from linear_model:
This list contains all the parameters that can be configured for a scikit-learn LinearRegression model when using it through Nextmv.
PARAMETER | DESCRIPTION |
---|---|
|
Whether to calculate the intercept for this model.
TYPE:
|
|
If True, X will be copied; else, it may be overwritten.
TYPE:
|
|
The number of jobs to use for the computation.
TYPE:
|
|
When set to True, forces the coefficients to be positive.
TYPE:
|
See Also
LinearRegressionOptions : Class that provides options for LinearRegression.
LinearRegressionOptions
¶
Options for the sklearn.linear_model.LinearRegression.
You can import the LinearRegressionOptions class directly from linear_model:
This class provides an interface for configuring scikit-learn's LinearRegression model to work with Nextmv.
ATTRIBUTE | DESCRIPTION |
---|---|
params |
List of LinearRegression parameters.
TYPE:
|
Examples:
>>> from nextmv_sklearn.linear_model import LinearRegressionOptions
>>> options = LinearRegressionOptions()
>>> nextmv_options = options.to_nextmv()
Source code in nextmv-scikit-learn/nextmv_sklearn/linear_model/options.py
to_nextmv
¶
Converts the options to a Nextmv options object.
RETURNS | DESCRIPTION |
---|---|
Options
|
A Nextmv options object containing the LinearRegression parameters. |
Examples: