-
- Downloads
[MRG+1] Raise error when SparseSeries is passed into classification metrics (#7373)
* Raise error when SparseSeries is passed into roc_curve * Changed "y_true" in second if block to "y_score" * Remove code to import pandas and add sparseseries check to 'type_of_target' function. Finally, add 'type_of_target' call to _binary_clf_curve * Remove pandas import and old comparison in roc_curve. * Add test for 'type_of_target' function * Add white space after commas * Correct other white space issues * Move type_of_target test into try clause, remove test_precision_recall_curve_pos_label since as multiclass it doesn't make sense * Add test_precision_recall_curve_pos_label back in and also add test_binary_clf_curve to test new logic in _binary_clf_curve function * Correct syntax and formatting. * Remove trailing white space * Correct validation logic * Update test_multiclass.py per @jnothman 's request. * Import SkipTest function. * Remove extra white space from line 303
Showing
- sklearn/metrics/ranking.py 7 additions, 1 deletionsklearn/metrics/ranking.py
- sklearn/metrics/tests/test_ranking.py 8 additions, 0 deletionssklearn/metrics/tests/test_ranking.py
- sklearn/utils/multiclass.py 4 additions, 0 deletionssklearn/utils/multiclass.py
- sklearn/utils/tests/test_multiclass.py 9 additions, 0 deletionssklearn/utils/tests/test_multiclass.py
Loading
Please register or sign in to comment