Plotting a ROC curve in scikit yields only 3 points
I had the same problem with a different example. The mistake I made was to input the outcomes for a given threshold and not the probabilities in the argument y_score
of roc_curve
. It also gives a plot with three points but it is a mistake !
The number of points depend on the number of unique values in the input. Since the input vector has only 2 unique values, the function gives correct output.
I ran into same problem, and after reading the documentaion carefully I realized that the mistake is in:
probas_ = model.predict_log_proba(X)
Although, there were hints pointed by others by checking the uniqueness. It should be instead:
probas_ = model.decisions(X)