roc_auc_score - Only one class present in y_true

前端 未结 5 1486
忘了有多久
忘了有多久 2020-12-16 14:28

I am doing a k-fold XV on an existing dataframe, and I need to get the AUC score. The problem is - sometimes the test data only contains 0s, and not 1s!

I tried usin

5条回答
  •  既然无缘
    2020-12-16 15:07

    You can increase the batch-size from e.g. from 32 to 64, you can use StratifiedKFold or StratifiedShuffleSplit. If the error still occurs, try shuffeling your data e.g. in your DataLoader.

提交回复
热议问题