三木

三木

要具体的,不要抽象的。

Evaluation metrics in machine learning - 1 [F, P, R]

Evaluation Metrics in Machine Learning#

In this section, I will provide a brief explanation and introduction when encountered, focusing on the most important parts, while other details can be found in relevant literature and blog posts.

1. About P and R Values#

These are probably the two most commonly used statistics in machine learning. To calculate them, we need to calculate the confusion matrix, with the simplest version shown below.
image

When calculating the 4 items in this table, the second item represents the predicted value, while the first item is compared with the actual value to determine if they are the same (True) or different (False).
Based on this table, we can calculate various metrics, with the most commonly used being P (Precision), R (Recall), and accuracy. The formulas for calculating them are as follows:

P = TP/TP+FP
R = TP/TP+FN
Accuracy = TP+TN/TP+FN+FP+TN

The meanings of these metrics are relatively easy to understand, so I won't elaborate further.

  1. Calculation of F Value
    The F value is the weighted harmonic mean of P and R. How can we understand it and why is this form used? If we carefully observe, the commonly used F1 value formula is similar to the formula for resistors in parallel:

F=2PR/P+R

  1. Others
    Based on these statistics, there are many other derived metrics and curves used to describe different performance aspects. Common ones include PR curves, AUC curves, etc., which are not complicated and can be referred to when needed.

  2. Reference
    https://www.cnblogs.com/Zhi-Z/p/8728168.html

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.