Open Cbanyungong opened 5 years ago
I'm sorry I can't get your question idea. You want to plot the precision_recall curve, but your code is just using plot_confusion_matrix
for confusion matrix. In fact, if you want to use plot_precision_recall_curve
, you have to make your prediction probability based on your test data, just like this:
prob = rf.predict_proba(X_test) skplt.metrics.plot_precision_recall_curve(y_test, prob) plt.show()
Dear sir Thanks for your excellent work in the scikit-plot. I am confused in the function of precision_recall_curve. As we all know,the PR curve goes through two points:(0,1) and(1,0).But I used the test code to draw the curve and found that the curve does not goes the point of (1,0).I used the below code and get the curve.