Definition (classification context)
For classification tasks, the terms true positives, true negatives, false positives, and false negatives (see also Type I and type II errors) compare the results of the classifier under test with trusted external judgments. The terms positive and negative refer to the classifier's prediction (sometimes known as the observation), and the terms true and false refer to whether that prediction corresponds to the external judgment (sometimes known as the expectation). This is illustrated by the table below:
| actual class (expectation) |
---|
|
---|
predicted class (observation) | tp (true positive) Correct result | fp (false positive) Unexpected result |
---|
fn (false negative) Missing result | tn (true negative) Correct absence of result |
Precision and recall are then defined as:[4]
[通俗理解:預測出來100個正例,事實只有30個,precesion就是0.3]
[通俗理解:總共200個正例,事實只有40個,recall就是0.2]
Recall in this context is also referred to as the True Positive Rate or Sensitivity, and precision is also referred to as Positive predictive value (PPV); other related measures used in classification include True Negative Rate and Accuracy:.[4] True Negative Rate is also called Specificity.


A measure that combines precision and recall is the harmonic mean of precision and recall, the traditional F-measure or balanced F-score:

Reference
http://en.wikipedia.org/wiki/Precision_and_recall
Compressed labeling on distilled labelsets for multi-label learning公式85和86,這是對應multi-label的precision和 recall。(例如第i個樣本的實際標記是 1 0 0;預測標記是1 1 0;該樣本對應的值是1/2,與單label的意義很好對應,物理意義很好理解)
)