5.2.2.1.2. sklearn.linear_model.RidgeClassifierCV¶
- class sklearn.linear_model.RidgeClassifierCV(alphas=array([ 0.1, 1., 10. ]), fit_intercept=True, normalize=False, score_func=None, loss_func=None, cv=None)¶
Methods
decision_function(X) fit(X, y[, sample_weight, class_weight]) Fit the ridge classifier. predict(X) score(X, y) Returns the coefficient of determination of the prediction set_params(**params) Set the parameters of the estimator. - __init__(alphas=array([ 0.1, 1., 10. ]), fit_intercept=True, normalize=False, score_func=None, loss_func=None, cv=None)¶
- fit(X, y, sample_weight=1.0, class_weight=None)¶
Fit the ridge classifier.
Parameters : X : array-like, shape = [n_samples, n_features]
Training vectors, where n_samples is the number of samples and n_features is the number of features.
y : array-like, shape = [n_samples]
Target values.
class_weight : dict, optional
Weights associated with classes in the form {class_label : weight}. If not given, all classes are supposed to have weight one.
sample_weight : float or numpy array of shape [n_samples]
Sample weight
Returns : self : object
Returns self.
- score(X, y)¶
Returns the coefficient of determination of the prediction
Parameters : X : array-like, shape = [n_samples, n_features]
Training set.
y : array-like, shape = [n_samples]
Returns : z : float
- set_params(**params)¶
Set the parameters of the estimator.
The method works on simple estimators as well as on nested objects (such as pipelines). The former have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object.
Returns : self :