gemseo.mlearning.linear_model_fitting.lars_settings module#

Settings for the scikit-lear least angle regression (LARS) algorithm.

Settings LARS_Settings(*, fit_intercept=True, copy_X=True, eps=np.float64(2.220446049250313e-16), fit_path=False, jitter=None, n_nonzero_coefs=500, precompute='auto', random_state=None, verbose=False)[source]#

Bases: BaseLinearModelFitter_Settings

Settings for the scikit-learn least angle regression (LARS) 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.

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

    By default it is set to 2.220446049250313e-16.

  • fit_path (bool) --

    By default it is set to False.

  • jitter (float | None)

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

    By default it is set to 500.

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

    By default it is set to "auto".

  • random_state (int | RandomState | None)

  • 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

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

fit_path: bool = False#

If True the full path is stored in the coef_path_ attribute. If you compute the solution for a large problem or many targets, setting fit_path to False will lead to a speedup, especially with a small alpha.

jitter: float | None = None#

Upper bound on a uniform noise parameter to be added to the output values, to satisfy the model's assumption of one-at-a-time computations. Might help with stability.

n_nonzero_coefs: PositiveInt = 500#

Target number of non-zero coefficients. Use np.inf for no limit.

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.

random_state: int | RandomState | None = None#

Determines random number generation for jittering. Pass an int for reproducible output across multiple function calls. Ignored if jitter is None.

verbose: bool = False#

Sets the verbosity amount.