Machine learning Practical Note (Python implementation) -07-classification performance metrics

Source: Internet
Author: User
Tags dashed line

1. Confusion Matrix

is a confusion matrix of two types of problems in which the output uses a different category label

Commonly used metrics to measure classification performance are:

    • The correct rate (Precision), which is equal to tp/(TP+FP), gives the ratio of the true positive example in the sample that is predicted to be a positive example.
    • recall Rate (Recall), which he equals to tp/(TP+FN), gives the true positive example of the predicted positive example as the proportion of all true positive cases.
2. ROC curve

The horizontal axis in the figure is the proportion of pseudo positive example (=fp/(FP+TN)), and the vertical is the ratio of the true example (Zhenyang rate =tp/(TP+FN)). The ROC curve gives the change of the false positive rate and Zhenyang rate when the threshold value changes. The point in the lower-left corner corresponds to the case where all samples are judged as counter-cases, and the point in the upper-right corner corresponds to the case where all samples are judged as positive cases. The dashed line gives the result curve of the random guess.

One indicator for comparing the different ROC curves is the area under the curve (Areas unser the Curve). The AUC gives the average performance value of the classifier, and of course it does not completely replace the observation of the whole curve. The AUC for a perfect classifier is 1.0, while the AUC with random guesses is 0.5.

The END.

Machine learning Practical Note (Python implementation) -07-classification performance metrics

Related Article

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.