Closed
Description
Describe the feature or idea you want to propose
I would like to make the method signature of the new methods equal to the old proxy methods in _binary.py
because of these reasons:
- streamlined API: all existing metrics use
y_true
as the first parameter andy_pred
as the second - consistency with the previous implementation in aeon
- consistency with the implementation in TimeEval
At the same time, there are some further optimizations possible:
- removal of the anomaly range input possibility (all our datasets and algorithms use either a vector of anomaly scores or binary predictions; no component supports lists of anomaly ranges)
- restoration of the old default values
- adding the new range metrics to the standard metric test suite in
tests/test_ad_metrics.py
- marking the
range_metrics.py
-file as private by renaming it to e. g._range_metrics.py
Describe your proposed solution
I. a. switching from
def ts_recall(y_pred, y_real, gamma="one", bias_type="flat", alpha=0.0):
...
to
def range_recall(
y_true: np.ndarray,
y_pred: np.ndarray,
alpha: float = 0,
cardinality: str = "reciprocal",
bias: str = "flat",
) -> float:
...