lale.lib.autogen.ridge_cv module

class lale.lib.autogen.ridge_cv.RidgeCV(*, alphas=['0.1', '1.0', '10.0'], fit_intercept=True, scoring=None, cv, gcv_mode=None, store_cv_values=False)

Bases: PlannedIndividualOp

Combined schema for expected data and hyperparameters.

This documentation is auto-generated from JSON schemas.

Parameters
  • alphas (array, not for optimizer, default [0.1, 1.0, 10.0] of items : float) – Array of alpha values to try

  • fit_intercept (boolean, default True) – Whether to calculate the intercept for this model

  • scoring (union type, default None) –

    A string (see model evaluation documentation) or a scorer callable object / function with signature scorer(estimator, X, y).

    • callable, not for optimizer

    • or ‘accuracy’ or None

  • cv (union type) –

    Cross-validation as integer or as object that has a split function.

    The fit method performs cross validation on the input dataset for per trial, and uses the mean cross validation performance for optimization. This behavior is also impacted by handle_cv_failure flag. If integer: number of folds in sklearn.model_selection.StratifiedKFold. If object with split function: generator yielding (train, test) splits as arrays of indices. Can use any of the iterators from https://scikit-learn.org/stable/modules/cross_validation.html#cross-validation-iterators.

    • integer, >=1, >=3 for optimizer, <=4 for optimizer, uniform distribution, default 5

    • or Any, not for optimizer

  • gcv_mode (None, ‘auto’, ‘svd’, or ‘eigen’, default None) – Flag indicating which strategy to use when performing Generalized Cross-Validation

  • store_cv_values (boolean, default False) – Flag indicating if the cross-validation values corresponding to each alpha should be stored in the cv_values_ attribute (see below)

Notes

constraint-1 : any type

fit(X, y=None, **fit_params)

Train the operator.

Note: The fit method is not available until this operator is trainable.

Once this method is available, it will have the following signature:

Parameters
  • X (array of items : array of items : float) – Training data

  • y (union type) –

    Target values

    • array of items : float

    • or array of items : array of items : float

  • sample_weight (union type, optional) –

    Sample weight

    • float

    • or array of items : float

predict(X, **predict_params)

Make predictions.

Note: The predict method is not available until this operator is trained.

Once this method is available, it will have the following signature:

Parameters

X (union type) –

Samples.

  • array of items : Any

  • or array of items : array of items : float

Returns

result – Returns predicted values.

Return type

array of items : float