Skip to content

Commit 63b2a06

Browse files
committed
MAINT Deprecated the UndefinedMetricWarning at sklearn.metrics.base
1 parent 4c86db9 commit 63b2a06

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

sklearn/metrics/base.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
"""
23
Common code for all metrics
34
@@ -19,6 +20,13 @@
1920
from ..utils import check_array, check_consistent_length
2021
from ..utils.multiclass import type_of_target
2122

23+
from ..exceptions import UndefinedMetricWarning
24+
from ..utils import deprecated
25+
26+
UndefinedMetricWarning = deprecated("UndefinedMetricWarning has been moved "
27+
"into the sklearn.exceptions module. "
28+
"It will not be available here from "
29+
"version 0.19")(UndefinedMetricWarning)
2230

2331
def _average_binary_score(binary_metric, y_true, y_score, average,
2432
sample_weight=None):

0 commit comments

Comments
 (0)