The P<sub>4</sub> metric (also known as FS or <i>Symmetric F</i> ) enables performance evaluation of a binary classifier. The P<sub>4</sub> metric is calculated from precision, recall, specificity, and NPV (negative predictive value). The definition of the P<sub>4</sub> metric is similar to that of the F<sub>1</sub> metric, however the P<sub>4</sub> metric definition addresses criticisms leveled against the definition of the F<sub>1</sub> metric. The definition of the P<sub>4</sub> metric may, therefore, be understood as an extension of the F<sub>1</sub> metric.
Like the other known metrics, the P<sub>4</sub> metric is a function of: TP (true positives), TN (true negatives), FP (false positives), FN (false negatives).
The key concept of the P<sub>4</sub> metric is to leverage the four key conditional probabilities:
The main assumption behind this metric is that all the probabilities mentioned above are close to 1 for a properly designed binary classifier. Indeed, if, and only if, all of the probabilities above are equal to 1. Another important feature is that tends to zero any of the above probabilities tend to zero.
P<sub>4</sub> is defined as a harmonic mean of four key conditional probabilities:
In terms of TP,TN,FP,FN it can be calculated as follows:
Evaluating the performance of binary classifiers is a multidisciplinary concept. It spans from the evaluation of medical tests, psychiatric tests to machine learning classifiers from a variety of fields. Thus, many of the metrics in use exist under several names, some defined independently.
Dependency table for selected metrics ("true" means depends, "false" - does not depend):
Metrics that do not depend on a given probability are prone to misrepresentation when the probability approaches 0.
Let us consider a medical test used to detect a rare disease. Suppose a population size of 100000 and 0.05% of the population is infected. Further suppose the following test performance: 95% of all positive individuals are classified correctly (TPR=0.95) and 95% of all negative individuals are classified correctly (TNR=0.95). In such a case, due to high population imbalance and in spite of having high test accuracy (0.95), the probability that an individual who has been classified as positive is in fact positive is very low:
We can observe how this low probability is reflected in some of the metrics:
Consider the problem of training a neural network based image classifier with only two types of images: those containing dogs (labeled as 0) and those containing cats (labeled as 1). Thus, the goal is to distinguish between the cats and dogs. Suppose that the classifier overpredicts in favour of cats ("positive" samples): 99.99% of cats are classified correctly and only 1% of dogs are classified correctly. Further, suppose that the image dataset consists of 100000 images, 90% of which are pictures of cats and 10% are pictures of dogs. In this situation, the probability that the picture containing dog will be classified correctly is pretty low:
Not all metrics are notice this low probability: