gemseo.mlearning.linear_model_fitting.omp_settings module#

Settings for the scikit-learn Orthogonal Matching Pursuit (OMP) algorithm.

Settings OrthogonalMatchingPursuit_Settings(*, fit_intercept=True, n_nonzero_coefs=None, precompute='auto', tol=1e-07)[source]#

Bases: BaseLinearModelFitter_Settings

Settings for the scikit-learn Orthogonal Matching Pursuit (OMP) 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.

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

  • precompute (bool | Literal['auto']) --

    By default it is set to "auto".

  • tol (Annotated[float, Gt(gt=0)]) --

    By default it is set to 1e-07.

Return type:

None

n_nonzero_coefs: PositiveInt | None = None#

The desired number of non-zero coefficients. Ignored if tol is set. When None and tol is also None, this value is either set to 10% of the input dimension or 1, whichever is greater.

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

Whether to use a precomputed Gram and Xy matrix to speed up calculations. Improves performance when the output dimension or the number of samples is very large.

tol: PositiveFloat = 1e-07#

The maximum squared norm of the residual normalized by the infinite norm of the output data.

Constraints:
  • gt = 0