Skip to content

Commit

Permalink
update: removed aeon estimator test & changed documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
notaryanramani committed Oct 27, 2024
1 parent 59a8b82 commit 0a96556
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
2 changes: 2 additions & 0 deletions aeon/anomaly_detection/_cblof.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ class CBLOF(PyODAdapter):
If not set, CBLOF uses KMeans for scalability. See
https://scikit-learn.org/stable/modules/generated/sklearn.cluster.KMeans.html
aeon clustering estimators are not supported.
alpha : float in (0.5, 1), default=0.9
Coefficient for deciding small and large clusters. The ratio
of the number of samples in large clusters to the number of samples in
Expand Down
26 changes: 0 additions & 26 deletions aeon/anomaly_detection/tests/test_cblof.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,29 +91,3 @@ def test_custom_clustering_estimator():

assert preds.shape == (100,)
assert 20 <= np.argmax(preds) <= 30


@pytest.mark.skipif(
not _check_soft_dependencies("pyod", severity="none"),
reason="required soft dependency PyOD not available",
)
def test_with_aeon_estimator():
"""Test with aeon estimator."""
from aeon.clustering import TimeSeriesKMeans

series = make_example_1d_numpy(n_timepoints=100, random_state=0)
series[22:28] -= 2

estimator = TimeSeriesKMeans(n_clusters=2, distance="euclidean")
cblof = CBLOF(
n_clusters=2,
clustering_estimator=estimator,
window_size=5,
stride=1,
random_state=2,
)

preds = cblof.fit_predict(series)

assert preds.shape == (100,)
assert 20 <= np.argmax(preds) <= 30

0 comments on commit 0a96556

Please sign in to comment.