Skip to content

Commit 0f04d6f

Browse files
Merge branch 'main' into wnorm_add
2 parents eb1265f + f535412 commit 0f04d6f

File tree

39 files changed

+2721
-362
lines changed

39 files changed

+2721
-362
lines changed

.github/utilities/run_examples.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/opt/homebrew/bin/bash
22

33
# Script to run all example notebooks.
44
set -euxo pipefail
@@ -23,6 +23,7 @@ if [ "$1" = true ]; then
2323
"examples/classification/shapelet_based.ipynb"
2424
"examples/classification/convolution_based.ipynb"
2525
"examples/similarity_search/code_speed.ipynb"
26+
"examples/transformations/signature_method.ipynb"
2627

2728
)
2829
fi
@@ -32,7 +33,7 @@ notebooks=()
3233
runtimes=()
3334

3435
# Loop over all notebooks in the examples directory.
35-
find "examples/" -name "*.ipynb" -print0 |
36+
find "examples" -name "*.ipynb" -print0 |
3637
while IFS= read -r -d "" notebook; do
3738
# Skip notebooks in the excluded list.
3839
if printf "%s\0" "${excluded[@]}" | grep -Fxqz -- "$notebook"; then

.github/workflows/periodic_tests.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,17 @@ jobs:
4646
extra_args: --all-files
4747

4848
run-notebook-examples:
49-
runs-on: ubuntu-24.04
49+
runs-on: macos-14
5050

5151
steps:
5252
- name: Checkout
5353
uses: actions/checkout@v4
5454

55+
- name: Install latest version of bash
56+
run: |
57+
brew install bash
58+
/opt/homebrew/bin/bash --version
59+
5560
- name: Setup Python 3.10
5661
uses: actions/setup-python@v5
5762
with:

.github/workflows/pr_examples.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,17 @@ concurrency:
1919

2020
jobs:
2121
run-notebook-examples:
22-
runs-on: ubuntu-24.04
22+
runs-on: macos-14
2323

2424
steps:
2525
- name: Checkout
2626
uses: actions/checkout@v4
2727

28+
- name: Install latest version of bash
29+
run: |
30+
brew install bash
31+
/opt/homebrew/bin/bash --version
32+
2833
- name: Setup Python 3.10
2934
uses: actions/setup-python@v5
3035
with:

.github/workflows/pr_precommit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
python-version: "3.10"
3838

3939
- name: Get changed files
40-
uses: tj-actions/changed-files@v45
40+
uses: tj-actions/changed-files@v46.0.3
4141
id: changed-files
4242

4343
- name: List changed files

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ repos:
2929
args: [ "--create", "--python-folders", "aeon" ]
3030

3131
- repo: https://github.com/astral-sh/ruff-pre-commit
32-
rev: v0.9.10
32+
rev: v0.11.2
3333
hooks:
3434
- id: ruff
3535
args: [ "--fix"]
@@ -48,7 +48,7 @@ repos:
4848
args: [ "--profile=black", "--multi-line=3" ]
4949

5050
- repo: https://github.com/pycqa/flake8
51-
rev: 7.1.2
51+
rev: 7.2.0
5252
hooks:
5353
- id: flake8
5454
additional_dependencies: [ flake8-bugbear, flake8-print, Flake8-pyproject ]

aeon/base/_base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ class and object methods, class attributes
8686
-------
8787
self : object
8888
Reference to self.
89+
90+
Raises
91+
------
92+
TypeError
93+
If 'keep' is not a string or a list of strings.
8994
"""
9095
# retrieve parameters to copy them later
9196
params = self.get_params(deep=False)

aeon/benchmarking/metrics/anomaly_detection/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
"range_pr_auc_score",
1515
"range_pr_vus_score",
1616
"range_roc_vus_score",
17+
"ts_precision",
18+
"ts_recall",
19+
"ts_fscore",
1720
]
1821

1922
from aeon.benchmarking.metrics.anomaly_detection._binary import (
@@ -35,3 +38,8 @@
3538
range_roc_auc_score,
3639
range_roc_vus_score,
3740
)
41+
from aeon.benchmarking.metrics.anomaly_detection.range_metrics import (
42+
ts_fscore,
43+
ts_precision,
44+
ts_recall,
45+
)

aeon/benchmarking/metrics/anomaly_detection/_binary.py

Lines changed: 22 additions & 0 deletions
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)