gemseo.mlearning.linear_model_fitting.lars_cv_settings module#

Settings for the scikit-lear least angle regression (LARS) algorithm with build-in cross-validation.

Settings LARSCV_Settings(*, fit_intercept=True, copy_X=True, max_iter=500, cv=None, eps=np.float64(2.220446049250313e-16), precompute='auto', verbose=False)[source]#

Bases: BaseLinearModelFitter_Settings

Settings for the scikit-learn least angle regression (LARS) algorithm with build-in cross-validation.

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 500.

  • cv (int | None)

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

    By default it is set to 2.220446049250313e-16.

  • precompute (Literal['auto'] | ~numpy.ndarray) --

    By default it is set to "auto".

  • verbose (bool) --

    By default it is set to False.

Return type:

None

copy_X: bool = True#

If True, input data will be copied; else, it may be overwritten

cv: int | None = None#

The number of folds. If None, use the efficient Leave-One-Out cross-validation.

eps: NonNegativeFloat = np.float64(2.220446049250313e-16)#

The machine-precision regularization in the computation of the Cholesky diagonal factors. Increase this for very ill-conditioned systems. Unlike the tol parameter in some iterative optimization-based algorithms, this parameter does not control the tolerance of the optimization.

Constraints:
  • ge = 0

max_iter: PositiveInt = 500#

The maximum number of iterations.

Constraints:
  • gt = 0

precompute: Literal['auto'] | ndarray = 'auto'#

Whether to use a precomputed Gram matrix to speed up calculations. If set to "auto" let us decide. The Gram matrix can also be passed as argument.

verbose: bool = False#

Sets the verbosity amount.