lale.lib.autogen.ridge_classifier_cv module

class lale.lib.autogen.ridge_classifier_cv.RidgeClassifierCV(*, alphas=['0.1', '1.0', '10.0'], fit_intercept=True, scoring=None, cv=None, class_weight=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, default None) –

    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

    • or None

    See also constraint-2.

  • class_weight (union type, default None) –

    Weights associated with classes in the form {class_label: weight}

    • ’balanced’

    • or None

  • 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)

    See also constraint-2.

Notes

constraint-1 : any type

constraint-2 : union type

cv!=None and store_cv_values=True are incompatible

  • cv : None

  • or store_cv_values : False

decision_function(X)

Confidence scores for all classes.

Note: The decision_function 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 – Confidence scores per (sample, class) combination

Return type

Any

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 vectors, where n_samples is the number of samples and n_features is the number of features.

  • y (array of items : float) – Target values

  • 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 – Predicted class label per sample.

Return type

array of items : float