简体   繁体   English

python - 为不同的多类分类器绘制精度召回曲线

[英]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.我想在一个图中为每个人绘制 PR 曲线。 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. Plotly 带有方便的笔记本集成,作为交互式绘图。 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.您可以使用“add_trace”方法添加不同的行,您可以在页面上找到它,并在单个交互式图中观察所有这些行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用不同分类器的 sklearn precision_recall_curve 函数 - Using sklearn precision_recall_curve function with different classifiers Plot DecisionTreeClassifier 的多类 ROC 曲线 - Plot multi-class ROC curve for DecisionTreeClassifier Plot ROC 曲线与 sklearn 用于硬多类预测 - Plot ROC curve with sklearn for hard multi-class predictions 对多类问题执行 K 折交叉验证,评分 = 'f1 or Recall or Precision' - performing K-fold Cross Validation with scoring = 'f1 or Recall or Precision' for multi-class problem 如何使用交叉验证在多类数据集中对精度、召回率和 f1-score 进行评分? - how to score precision, recall and f1-score in a multi-class dataset using cross-validate? 在 PyML 中获取多类问题的召回(灵敏度)和精度(PPV)值 - Get recall (sensitivity) and precision (PPV) values of a multi-class problem in PyML 我无法绘制以下数据:(精确回忆曲线) - I can't plot the following data : (Precision-Recall curve) 在scikit的precision_recall_curve中,为什么阈值与召回和精确度有不同的维度? - In scikit's precision_recall_curve, why does thresholds have a different dimension from recall and precision? 多类列的熊猫图 CDF - pandas plot CDF for multi-class column 多级分类的ROC曲线,在python中没有一个对所有 - ROC curve for multi-class classification without one vs all in python
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM