Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

scikit learn ridge classifier

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 -;)
 
PREVIOUS NEXT
Tagged: #scikit #learn #ridge #classifier
ADD COMMENT
Topic
Name
2+1 =