简体   繁体   中英

python - Plot Precision Recall Curve for different multi-class classifiers

I have predicted output for validation data which is single label multi-class classifier. I have run multiple classifiers. I want to plot the PR curves for each of them in a single plot. I am not able to do that. Any pointers?

For a single classifier, the dataframe with results look like this : 

label   predictedAns    predictedProb
1       2                 0.999281
2       2                 0.999754
2       2                 0.999754
3       3                 0.999762
2       2                 0.999641
2       2                 0.999641
2       2                 0.9996

You can seperately calculate metrics you want to observe for different cutoffs, and then refer to this page later on. Plotly comes with handy notebook integration, as interactive plots. You can add different lines with "add_trace" method which you can find it on the page, and observe all of them in a single interactive plot.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM