Skip to content

Commit 5a1b5db

Browse files
[DEP] Remove prts dependency (#2863)
* remove prts from pyproject * docs * Update _continuous.py * Automatic `pre-commit` fixes --------- Co-authored-by: MatthewMiddlehurst <25731235+MatthewMiddlehurst@users.noreply.github.com>
1 parent f73b9a6 commit 5a1b5db

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

aeon/benchmarking/metrics/anomaly_detection/_continuous.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ def f_score_at_k_ranges(
180180

181181
threshold = top_k_ranges_threshold(y_true, y_score, k)
182182
y_pred = y_score >= threshold
183-
# Corrected p_alpha to 1 to match original prts behavior expectation
184183
return range_f_score(y_true, y_pred, p_alpha=1, r_alpha=1, cardinality="reciprocal")
185184

186185

@@ -209,12 +208,11 @@ def rp_rr_auc_score(
209208
y_score : np.ndarray
210209
Anomaly scores for each point of the time series of shape (n_instances,).
211210
max_samples: int
212-
The implementation of the range-based precision and recall metrics is quite
213-
slow because it relies on the non-optimized ``prts``-package. To prevent long
214-
runtimes caused by scorings with high precision (many thresholds), just a
215-
specific amount of possible thresholds is sampled. This parameter controls the
216-
maximum number of thresholds; however, too low numbers degrade the metrics'
217-
quality.
211+
The calculation of the range-based precision and recall metrics can be slow.
212+
To prevent long runtimes caused by scorings with high precision
213+
(many thresholds), a specified amount of possible thresholds is sampled.
214+
This parameter controls the maximum number of thresholds; however, too low
215+
numbers degrade the metrics' quality.
218216
r_alpha : float
219217
Weight of the existence reward for the range-based recall.
220218
p_alpha : float

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ unstable_extras = [
8383
# requires gcc and fftw to be installed for Windows and some other OS (see http://www.fftw.org/index.html)
8484
"mrsqm>=0.0.7,<0.1.0; platform_system != 'Windows' and python_version < '3.12'",
8585
"mrseql>=0.0.4,<0.1.0; platform_system != 'Windows' and python_version < '3.12'",
86-
# very outdated and used code is deprecated
87-
"prts>=1.0.0.0",
8886
# Upper bound set as <1.0.0 as 1.0 dropped support for python 3.9. We will remove
8987
# the upper bound once we also drop support for python 3.9 later in 2025.
9088
"esig>=0.9.7,<1.0.0; platform_system != 'Darwin' and python_version < '3.11'",

0 commit comments

Comments
 (0)