Is it normal if the false positive rate in the ROC curve does not end at 1.0?

I have the following ROC curve:

Roc curve

And it does not end at 1.0, because my predictions include zeros, for example

prediction = [0.9, 0.1, 0.8, 0.0]

For the ROC curve, I take top-k forecasts, first {0.9}, then {0.9, 0.8}, etc. And if the forecast no longer has values> 0, the prediction no longer changes with increasing k.

Therefore, I can’t get the true negative value of zero, and since the false positive speed is fp / (fp + tn), the curve ends before it reaches 1.

Now, if I artificially use zeros for predictions, or is it normal if the curve ends like this? It is also wrong to use zeros. Or am I missing something?

+4
source share
2 answers

The ROC curve shows possible tradeoffs between false positives and false negatives when setting the threshold for different values. On the one hand, you can set the threshold so low that you designate everything as positive, giving you a false negative rate of 0 and a false positive rate 1. On the other hand, you can set the threshold so high that you stick everything as negative, giving you false negative speed 1 and false positive speed 0.

While these degenerate cases are not useful in practice, they are still theoretically acceptable compromises and are a normal part of the ROC curve.

+4
source

Oh sure! As previously mentioned by antimony, the ROC curve is used to display a trade-off between false positive and true positive speed. I remember as soon as I trained the neural network according to the data, and I got 0 for false positive speed (since fp was 0) in 90% of cases when I ran the model. that was great! Since my TPR was in most cases 1, my ROC curve was rather strange, since these were mainly points on the Y axis (TPR axis).

Your model is working fine, as your FPR does not go beyond certain values.

Let me give an example, for specific input variables my model works below: Predicted output: [0.97, 5.78E-4, 6,15E-4] Real outputs: [1.0, 0.0, 0.0]

You can see that the model perfectly predicts, because the first value, which is the predicted value for the corresponding class 1, is easily distinguished from the other two values. In addition, since the other two values, I mean [5.78E-4, 6.15E-4], are very small compared to 0.97. For each clipping, 0.97 will be mapped to 1, and the other two values ​​mapped to 0. We can see that regardless of the fact that the TPR cutoff is high and the FPR is zero.

+1
source

All Articles