Python Forum
dummy classifier accuracy and recall score
Thread Rating:
  • 2 Vote(s) - 2.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dummy classifier accuracy and recall score
#1
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()
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to find the accuracy vs number of neighbours for KNN vokoyo 3 1,744 Apr-10-2019, 03:46 AM
Last Post: scidam
  How to find the accuracy for Random Forest vokoyo 2 2,066 Apr-09-2019, 10:50 PM
Last Post: vokoyo
  Average score MartinEvtimov 5 4,228 Apr-02-2017, 07:35 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020