0
$\begingroup$

i plotted the ROC curve for RandomForest Classifier and this is what i get :

enter image description here

The shape looks weird to me , can somebody help me to make sense of it , and is this shape 'common' to not say normal?

thank you.

$\endgroup$

2 Answers 2

1
$\begingroup$

Imagine you have a blue line drawn from the point (0,0) to the point (0, 0.51). Do you see a common shape now?

That happens because you have few or no predicted probabilities above 0.9 or something close to it, so the point with 0 false positives is never touched.

The ROC curve you are watching is perfectly normal.

$\endgroup$
1
  • $\begingroup$ Oh i see , thank you . $\endgroup$
    – Dimi
    May 22, 2019 at 2:24
0
$\begingroup$

Just to give a bit more context to help you understand better, the way a ROC curve is built is by iteratively calculating True Positive Rate (TPR) and False Positive Rate (FPR) based on the updated confusion matrix, for different values of the threshold.

So just to give a very simple example here, imagive you have the following:

  • Real labels: [0 0 1 1]
  • Predicted probabilities: [0.2 0.6 0.6 0.8]

Trying different thresholds, the TPR and FPR are calculated as:

-Threshold=0, Predicted labels: [1 1 1 1], TPR=1, FPR=1 -Threshold=0.2, Predicted labels: [0 1 1 1], TPR=1, FPR=1 -Threshold=0.4, Predicted labels: [0 1 1 1], TPR=1, FPR=1 -Threshold=0.6, Predicted labels: [0 1 1 1], TPR=1, FPR=1 -Threshold=0.8, Predicted labels: [0 0 0 1], TPR=1, FPR=1 -Threshold=1, Predicted labels: [0 0 0 0], TPR=1, FPR=1

The ROC curve would then look something like this:

Simple ROC curve example

This simple ROC curve, like the one in your graph, starts from (0, 0.5). The reason for that (as Juan also explained) is that in the example there are no labels with high probabilities (in our example the highest is 0.8).

For a better understanding of how the ROC curve can be created and interpreted you can have a look at this very well-explained answer https://stats.stackexchange.com/questions/132777/what-does-auc-stand-for-and-what-is-it/132832#132832.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.