TextBlob
TextBlob copied to clipboard
Accuracy of Naive Bayes classifier
Hi, Does anyone know how to get the accuracy, precision, recall and most informative features of Naive Bayes Classifier which is already trained using movie corpus data.
Thank you
http://textblob.readthedocs.io/en/dev/classifiers.html#evaluating-classifiers
This is only for the accuracy. What about precision, recall, and f-score?
Thanks.
Hi, any answer for this?
if you have a set of (a) predictions and (b) ground truth, you can calculate precision, recall, etc. by hand or by sklearn.
for example:
from sklearn.metrics import precision_score
print precision_score(y_true, y_pred) # automatically calculates precision