gemseo.mlearning.linear_model_fitting.ridge_cv_settings module#
Settings for the scikit-learn ridge algorithm with built-in cross-validation.
- class GCVMode(*values)[source]#
Bases:
StrEnumFlag indicating the strategy for Leave-One-Out Cross-Validation.
- AUTO = 'auto'#
- EIGEN = 'eigen'#
- SVD = 'svd'#
- Settings RidgeCV_Settings(*, fit_intercept=True, alphas=(0.001, 0.01, 0.1, 1.0, 10.0), gcv_mode=GCVMode.AUTO, alpha_per_target=False, scoring=None, cv=None)[source]#
Bases:
BaseLinearModelFitter_SettingsSettings for the scikit-learn ridge 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:
- Return type:
None
- alpha_per_target: bool = False#
The flag indicating whether to optimize the \(alpha\) value (picked from the
alphasparameter list) for each target separately (for multi-output settings: multiple prediction targets).
- alphas: tuple[NonNegativeFloat, ...] = (0.001, 0.01, 0.1, 1.0, 10.0)#
Values of \(\alpha\) to try. The constant \(\alpha\) multiplies the L2 term, controlling regularization strength.
- cv: int | None = None#
The number of folds. If
None, use the efficient Leave-One-Out cross-validation.