gemseo.mlearning.linear_model_fitting.lasso_settings module#

Settings for the scikit-learn lasso algorithm.

Settings Lasso_Settings(*, fit_intercept=True, copy_X=True, max_iter=1000, positive=False, precompute=False, random_state=None, selection='cyclic', tol=0.0001, alpha=1.0, warm_start=False)[source]#

Bases: _LassoSettingsMixin, BaseLinearModelFitter_Settings

Settings for the scikit-learn lasso algorithm.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
  • fit_intercept (bool) --

    By default it is set to True.

  • copy_X (bool) --

    By default it is set to True.

  • max_iter (Annotated[int, Gt(gt=0)]) --

    By default it is set to 1000.

  • positive (bool) --

    By default it is set to False.

  • precompute (bool | ndarray) --

    By default it is set to False.

  • random_state (int | RandomState | None)

  • selection (Literal['cyclic', 'random']) --

    By default it is set to "cyclic".

  • tol (Annotated[float, Ge(ge=0)]) --

    By default it is set to 0.0001.

  • alpha (Annotated[float, Ge(ge=0)]) --

    By default it is set to 1.0.

  • warm_start (bool) --

    By default it is set to False.

Return type:

None

alpha: NonNegativeFloat = 1.0#

The constant \(\alpha\) that multiplies the L1 term, controlling regularization strength.

Constraints:
  • ge = 0

warm_start: bool = False#

When set to True, reuse the solution of the previous call to fit as initialization, otherwise, just erase the previous solution.