For classification tasks, the terms "true positives", "true negatives", "false positives", and "false negatives" (see Type I and type II errors for definitions) 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 "expectation"), and the terms "true" and "false" refer to whether that prediction corresponds to the external judgment (sometimes known as the "observation").

Let us define an experiment from "P" positive instances and "N" negative instances for some condition. The four outcomes can be formulated in a 2×2 contingency table or confusion matrix, as follows:

Precision and recall are then defined as:

formula_3

formula_4

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. True negative rate is also called specificity.

formula_5

formula_6

Accuracy does not perform well with imbalanced data sets. For example, if you have 95 negative and 5 positive samples, classifying all as negative gives 0.95 accuracy score. Balanced Accuracy (bACC) overcomes this problem, by normalizing true positive and true negative predictions by the number of positive and negative samples, respectively, and divides their sum into two. This is equivalent to the following formula:
formula_7

Regarding the previous example (95 negative and 5 positive samples), classifying all as negative gives 0.5 balanced accuracy score out of the maximum bACC one, which is equivalent to the expected value of a random guess of a balanced data. Balanced Accuracy is suggested to use to measure how accurate is the overall performance of a model is, considering both positive and negative classes without worrying about the imbalance of a data set. Since most of the real data sets are imbalanced, Balanced Accuracy metric is suggested instead of Accuracy metric.

Additionally, the predicted positive condition rate (PPCR) identifies the percentage of the total population that is flagged; for example, for a search engine returning 30 results (retrieved documents) out of 1,000,000 documents, the PPCR is 0.003%. formula_8

সংগা (classification context)
প্রিসিশন
রিকল
সংগা (ইনফরমেশন রিট্রিভাল কনটেক্সট))