Skip to content

Commit 55f5724

Browse files
authored
[MNT,DEP] _binary.py metrics deprecated (aeon-toolkit#2600)
* functions deprecated * Empty-Commit * version changed
1 parent 0983df6 commit 55f5724

File tree

1 file changed

+22
-0
lines changed
  • aeon/benchmarking/metrics/anomaly_detection

1 file changed

+22
-0
lines changed

aeon/benchmarking/metrics/anomaly_detection/_binary.py

+22
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,19 @@
66
import warnings
77

88
import numpy as np
9+
from deprecated.sphinx import deprecated
910

1011
from aeon.benchmarking.metrics.anomaly_detection._util import check_y
1112
from aeon.utils.validation._dependencies import _check_soft_dependencies
1213

1314

15+
# TODO: Remove in v1.2.0
16+
@deprecated(
17+
version="1.1.0",
18+
reason="range_precision is deprecated and will be removed in v1.2.0. "
19+
"Please use ts_precision from the range_metrics module instead.",
20+
category=FutureWarning,
21+
)
1422
def range_precision(
1523
y_true: np.ndarray,
1624
y_pred: np.ndarray,
@@ -70,6 +78,13 @@ def range_precision(
7078
return ts_precision(y_true, y_pred, alpha=alpha, cardinality=cardinality, bias=bias)
7179

7280

81+
# TODO: Remove in v1.2.0
82+
@deprecated(
83+
version="1.1.0",
84+
reason="range_recall is deprecated and will be removed in v1.2.0. "
85+
"Please use ts_recall from the range_metrics module instead.",
86+
category=FutureWarning,
87+
)
7388
def range_recall(
7489
y_true: np.ndarray,
7590
y_pred: np.ndarray,
@@ -131,6 +146,13 @@ def range_recall(
131146
return ts_recall(y_true, y_pred, alpha=alpha, cardinality=cardinality, bias=bias)
132147

133148

149+
# TODO: Remove in v1.2.0
150+
@deprecated(
151+
version="1.1.0",
152+
reason="range_f_score is deprecated and will be removed in v1.2.0. "
153+
"Please use ts_fscore from the range_metrics module instead.",
154+
category=FutureWarning,
155+
)
134156
def range_f_score(
135157
y_true: np.ndarray,
136158
y_pred: np.ndarray,

0 commit comments

Comments
 (0)