Skip to content

[DEP] Remove prts dependency #2863

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions aeon/benchmarking/metrics/anomaly_detection/_continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ def f_score_at_k_ranges(

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


Expand Down Expand Up @@ -209,12 +208,11 @@ def rp_rr_auc_score(
y_score : np.ndarray
Anomaly scores for each point of the time series of shape (n_instances,).
max_samples: int
The implementation of the range-based precision and recall metrics is quite
slow because it relies on the non-optimized ``prts``-package. To prevent long
runtimes caused by scorings with high precision (many thresholds), just a
specific amount of possible thresholds is sampled. This parameter controls the
maximum number of thresholds; however, too low numbers degrade the metrics'
quality.
The calculation of the range-based precision and recall metrics can be slow.
To prevent long runtimes caused by scorings with high precision
(many thresholds), a specified amount of possible thresholds is sampled.
This parameter controls the maximum number of thresholds; however, too low
numbers degrade the metrics' quality.
r_alpha : float
Weight of the existence reward for the range-based recall.
p_alpha : float
Expand Down
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ unstable_extras = [
# requires gcc and fftw to be installed for Windows and some other OS (see http://www.fftw.org/index.html)
"mrsqm>=0.0.7,<0.1.0; platform_system != 'Windows' and python_version < '3.12'",
"mrseql>=0.0.4,<0.1.0; platform_system != 'Windows' and python_version < '3.12'",
# very outdated and used code is deprecated
"prts>=1.0.0.0",
# Upper bound set as <1.0.0 as 1.0 dropped support for python 3.9. We will remove
# the upper bound once we also drop support for python 3.9 later in 2025.
"esig>=0.9.7,<1.0.0; platform_system != 'Darwin' and python_version < '3.11'",
Expand Down