The performance of the algorithm for judging the variance of the classification results by Precision/recall

Source: Internet
Author: User

When we classify certain problems, the distribution of real results is obviously biased.

For example, if cancer is classified, only 0.5% of testing set may have cancer.

At this point, if the number of direct number of the wrong classification, then a person every time predicted that no cancer algorithm is also excellent performance.

At this point, we need to introduce a pair of new criteria: Precision/recall to perform the performance evaluation of the algorithm, which are defined as follows:

As can be seen, Precision said: Predict an event occurs, it actually occurs the probability of how much. In other words: predict the probability of the quasi.

Recall says: What is the probability that a thing actually happens and can predict it? In other words: What is the extent of predicting leaks?

By using these two criteria, the performance of the algorithm can be judged effectively when the distribution of the test set is uneven.

In the actual use of the process to note: to the probability of a very small but we are very concerned about the label of the class to 1, the probability of a large class label set to 0.

However, the setting of two standards has led to a trade-off question: when we choose the algorithm, in the end is more value Precison and will recall it?

In order to solve this entanglement, the predecessors introduced a method called F1 score or F score to evaluate the algorithm.

It is calculated as:

where p represents the precision value and r represents the recall value.

As you can see, when either P or R is 0 o'clock, the value of the entire F1 score is 0, indicating that the algorithm is poor.

When P and R are 1 o'clock, the F1 score value is 1, which indicates that the algorithm is very good.

The performance of the algorithm for judging the variance of the classification results by Precision/recall

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.