I am running a binary classification with a random forest via the ranger
package in R
, and am using the pROC
package for building an ROC curve and calculating AUC. But, the using the coords()
function returns only three rows, and two of them are either -Inf
or Inf
.
> coords(rf_roc)
threshold specificity sensitivity
1 -Inf 0.000 1.000
2 0.5 0.692 0.806
3 Inf 1.000 0.000
My question is: Is this normal, or does it indicate that there is an issue in my model/data?
For reference, I've included the confusion matrix results:
Confusion Matrix and Statistics
Reference
Prediction 0 1
0 211 72
1 94 300
Accuracy : 0.755
95% CI : (0.721, 0.787)
No Information Rate : 0.549
P-Value [Acc > NIR] : <0.0000000000000002
Kappa : 0.502
Mcnemar's Test P-Value : 0.103
Sensitivity : 0.806
Specificity : 0.692
Pos Pred Value : 0.761
Neg Pred Value : 0.746
Prevalence : 0.549
Detection Rate : 0.443
Detection Prevalence : 0.582
Balanced Accuracy : 0.749
'Positive' Class : 1