I'm using scikit learn, and I want to plot the precision and recall curves. the classifier I'm using is RandomForestClassifier
. All the resources in the documentations of scikit learn uses binary classification. Also, can I plot a ROC curve for multiclass?
Also, I only found for SVM for multilabel and it has a decision_function
which RandomForest
doesn't have
From scikit-learn documentation:
Therefore, you should binarize the output and consider precision-recall and roc curves for each class. Moreover, you are going to use
predict_proba
to get class probabilities.I divide the code into three parts:
1. general settings, learning and prediction
2. precision-recall curve
3. ROC curve