What does the classifier report tell us in skikit-learn? -



What does the classifier report tell us in skikit-learn? -

i'm using skikit-learn text classification. when used classification_report() function returned next table:

precision recall f1-score back upwards neg 0.86 0.69 0.77 351 pos 0.82 0.92 0.87 517 avg / total 0.83 0.83 0.83 868

what meaning of precision, recall , f1-score? conclusions can made above values? also, these values reflect classifier?

recall reflects how many examples of given class labeled beingness of class. precision reflects how many examples labeled classifier beingness of class examples class.

suppose have 2 classes neg , pos. if label all of examples beingness of class neg recall neg great, @ 1.00 or 100%, because whenever illustration of class neg labeled neg. @ same time recall pos horrible, because not single illustration of class pos labeled pos. additionally precision neg bad, because lot of examples labeled neg pos.

conversely might give examples label neg if absolutely sure belong class neg. recall neg horrible, because grab hardly of neg examples. precision great, because (nearly) of examples labeled neg of class neg.

so: labeling beingness of class result in high recall class a, bad precision. labeling nil beingness of class end in low recall, high precision class a.

the f1-score listed merge of recall , precision. if f1-score high both recall , precision tend good. if low recall , precision tend bad.

from illustration values can derive classifiers performance seems not bad f1-score of 0.83. recall neg bit low compared other values classifier has problems spotting examples neg , labels pos instead (which lowers precision pos). if results of training , not test set differences in back upwards values indicate have more examples pos neg, meaning training on skewed dataset. balancing numbers lead more balanced recall.

further reading:

wikipedia recall , precision stanford summary of recall , precision scikit documentation of function sklearn.metrics.precision_recall_fscore_support

scikit-learn

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -