Oct-31-2017, 09:27 AM
Dear Python Experts,
I have been searching for a few hours now how to use a dummy classifier to get the accuracy and recall score
but cant find any parameters or methods to get them.
I have been searching for a few hours now how to use a dummy classifier to get the accuracy and recall score
but cant find any parameters or methods to get them.
def x(): from sklearn.dummy import DummyClassifier from sklearn.metrics import recall_score dummy_classifier = DummyClassifier(strategy="most_frequent") dummy_classifier.fit(X_train,y_train) #recall-------------- dummy_classifier.score(X_test, y_test) #accuracy----------- return dummy_classifier.score(X_test, y_test)x()