Plotting a ROC curve in scikit yields only 3 points

前端 未结 4 827
太阳男子
太阳男子 2020-12-31 03:06

TLDR: scikit\'s roc_curve function is only returning 3 points for a certain dataset. Why could this be, and how do we control how many points to get ba

4条回答
  •  一整个雨季
    2020-12-31 03:44

    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)
    

提交回复
热议问题