Home > Net >  How to get the roc auc score for multi-class classification in sklearn
How to get the roc auc score for multi-class classification in sklearn

Time:07-09

enter image description hereI get an error for roc-auc score for multiclass classification but my F1,precision and accuracy score is without any errors.

Error- 'axis 1 is out of bounds for array of dimension 1'

CodePudding user response:

roc_auc_score() expects an array of shape (n_samples, n_classes) as its second argument in a multiclass case (i.e. the result of predict_proba(), not the predict()).

CodePudding user response:

roc_auc_score() expects an array of shape (n_samples, n_classes) as its second argument in a multiclass case (i.e. the result of predict_proba(), not the predict()).

  • Related