lale.lib.sklearn.ridge_classifier module¶
- class lale.lib.sklearn.ridge_classifier.RidgeClassifier(*, alpha=1.0, fit_intercept=True, copy_X=True, max_iter=None, tol=0.0001, solver='auto', class_weight=None, random_state=None)¶
Bases:
PlannedIndividualOp
Ridge classifier from scikit-learn.
This documentation is auto-generated from JSON schemas.
- Parameters
alpha (union type, default 1.0) –
Regularization strength; larger values specify stronger regularization.
float, >0.0, >=1e-05 for optimizer, <=10.0 for optimizer, loguniform distribution
or array, not for optimizer of items : float, >0.0
Penalties specific to the targets.
fit_intercept (boolean, default True) – Whether to calculate the intercept for this model.
copy_X (boolean, optional, default True) – If True, X will be copied; else, it may be overwritten.
max_iter (union type, optional, default None) –
Maximum number of iterations for conjugate gradient solver.
integer, >=10 for optimizer, <=1000 for optimizer
or None
tol (float, >=1e-08 for optimizer, <=0.01 for optimizer, optional, default 0.0001) – Precision of the solution.
solver (‘auto’, ‘svd’, ‘cholesky’, ‘lsqr’, ‘sparse_cg’, ‘sag’, or ‘saga’, default ‘auto’) – Solver to use in the computational routines.
class_weight (union type, optional, not for optimizer, default None) –
Weights associated with classes in the form
{class_label: weight}
.dict
or ‘balanced’ or None
random_state (union type, optional, not for optimizer, default None) –
The seed of the pseudo random number generator to use when shuffling
integer
or numpy.random.RandomState
or None
- 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 (array of items : array of items : float) – Features; the outer array is over samples.
- Returns
result – Confidence scores for samples for each class in the model.
array of items : array of items : float
In the multi-way case, score per (sample, class) combination.
or array of items : float
In the binary case, score for self._classes[1].
- Return type
union 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 : array of items : float
or array of items : float
or array of items : string
or array of items : boolean
sample_weight (union type, optional) –
Individual weights for each sample
float
or array of items : float
or None
- 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, optional) –
Samples.
array of items : float
or array of items : array of items : float
- Returns
result – Predicted class label per sample.
array of items : float
or array of items : string
or array of items : boolean
- Return type
union type