dummy classifier accuracy and recall score - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Homework (https://python-forum.io/forum-9.html) +--- Thread: dummy classifier accuracy and recall score (/thread-5975.html) |
dummy classifier accuracy and recall score - metalray - Oct-31-2017 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. 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() |