8000 ENH Adds roc weighted scorers to SCORERS (#14417) · scikit-learn/scikit-learn@96bfae6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 96bfae6

Browse files
thomasjpfanamueller
authored andcommitted
ENH Adds roc weighted scorers to SCORERS (#14417)
1 parent 77fe325 commit 96bfae6

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

doc/modules/model_evaluation.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ Scoring Function
7272
'recall' etc. :func:`metrics.recall_score` suffixes apply as with 'f1'
7373
'jaccard' etc. :func:`metrics.jaccard_score` suffixes apply as with 'f1'
7474
'roc_auc' :func:`metrics.roc_auc_score`
75+
'roc_auc_ovr' :func:`metrics.roc_auc_score`
76+
'roc_auc_ovo' :func:`metrics.roc_auc_score`
77+
'roc_auc_ovr_weighted' :func:`metrics.roc_auc_score`
78+
'roc_auc_ovo_weighted' :func:`metrics.roc_auc_score`
7579

7680
**Clustering**
7781
'adjusted_mutual_info_score' :func:`metrics.adjusted_mutual_info_score`

sklearn/metrics/scorer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,8 @@ def make_scorer(score_func, greater_is_better=True, needs_proba=False,
558558
accuracy=accuracy_scorer, roc_auc=roc_auc_scorer,
559559
roc_auc_ovr=roc_auc_ovr_scorer,
560560
roc_auc_ovo=roc_auc_ovo_scorer,
561+
roc_auc_ovr_weighted=roc_auc_ovr_weighted_scorer,
562+
roc_auc_ovo_weighted=roc_auc_ovo_weighted_scorer,
561563
balanced_accuracy=balanced_accuracy_scorer,
562564
average_precision=average_precision_scorer,
563565
neg_log_loss=neg_log_loss_scorer,

sklearn/metrics/tests/test_score_objects.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@
5555
'recall', 'recall_weighted', 'recall_macro', 'recall_micro',
5656
'neg_log_loss', 'log_loss', 'brier_score_loss',
5757
'jaccard', 'jaccard_weighted', 'jaccard_macro',
58-
'jaccard_micro', 'roc_auc_ovr', 'roc_auc_ovo']
58+
'jaccard_micro', 'roc_auc_ovr', 'roc_auc_ovo',
59+
'roc_auc_ovr_weighted', 'roc_auc_ovo_weighted']
5960

6061
# All supervised cluster scorers (They behave like classification metric)
6162
CLUSTER_SCORERS = ["adjusted_rand_score",

0 commit comments

Comments
 (0)
0