sloria / TextBlob

Simple, Pythonic, text processing--Sentiment analysis, part-of-speech tagging, noun phrase extraction, translation, and more.
https://textblob.readthedocs.io/
MIT License
9.07k stars 1.13k forks source link

Accuracy of Naive Bayes classifier #128

Open chandra589 opened 8 years ago

chandra589 commented 8 years ago

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

IvRRimum commented 8 years ago

http://textblob.readthedocs.io/en/dev/classifiers.html#evaluating-classifiers

ikmalpani commented 7 years ago

This is only for the accuracy. What about precision, recall, and f-score?

Thanks.

radityagumay commented 7 years ago

Hi, any answer for this?

mynameisvinn commented 7 years ago

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