📜  scikit learn ridge 分类器 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:01.037000             🧑  作者: Mango

代码示例1
from sklearn.linear_model import RidgeClassifier
clf = RidgeClassifier().fit(X, y)
clf.fit(X, y) #We can fit Ridge Classifier to the dataset in this way too
clf.score(X, y) #Return the mean accuracy on the given test data and labels
cfl.predict(X) #Return the predictions

#Classification Metrics
#Accuracy Score
from sklearn.metrics import accuracy_score
accuracy_score(X, y)

#If you like answer, please vote -;)