From 2e1fdd22153a1cc48ed2992a4836bb27fb8750c9 Mon Sep 17 00:00:00 2001 From: Kaustbh Date: Wed, 26 Mar 2025 23:33:41 +0530 Subject: [PATCH 1/6] Refactor Anomaly Detection Module into Submodules by Algorithm Family --- aeon/anomaly_detection/__init__.py | 28 ++----------------- .../distance_based/__init__.py | 17 +++++++++++ .../{ => distance_based}/_cblof.py | 0 .../{ => distance_based}/_kmeans.py | 0 .../{ => distance_based}/_left_stampi.py | 0 .../{ => distance_based}/_lof.py | 0 .../{ => distance_based}/_merlin.py | 0 .../{ => distance_based}/_stomp.py | 0 .../distance_based/tests/__init__.py | 1 + .../{ => distance_based}/tests/test_cblof.py | 0 .../{ => distance_based}/tests/test_kmeans.py | 0 .../tests/test_left_stampi.py | 0 .../{ => distance_based}/tests/test_lof.py | 0 .../{ => distance_based}/tests/test_merlin.py | 0 .../{ => distance_based}/tests/test_stomp.py | 0 .../distribution_based/__init__.py | 9 ++++++ .../{ => distribution_based}/_copod.py | 0 .../{ => distribution_based}/_dwt_mlead.py | 0 .../distribution_based/tests/__init__.py | 1 + .../tests/test_copod.py | 0 .../tests/test_dwt_mlead.py | 0 .../outlier_detection/__init__.py | 11 ++++++++ .../{ => outlier_detection}/_iforest.py | 0 .../{ => outlier_detection}/_pyodadapter.py | 0 .../{ => outlier_detection}/_stray.py | 0 .../outlier_detection/tests/__init__.py | 1 + .../tests/test_iforest.py | 0 .../tests/test_pyod_adapter.py | 0 .../tests/test_stray.py | 0 .../sklearn_based/__init__.py | 7 +++++ .../{ => sklearn_based}/_one_class_svm.py | 0 .../sklearn_based/tests/__init__.py | 1 + .../tests/test_one_class_svm.py | 0 .../whole_series/__init__.py | 7 +++++ .../{ => whole_series}/_rockad.py | 0 .../whole_series/tests/__init__.py | 1 + .../{ => whole_series}/tests/test_rockad.py | 0 37 files changed, 58 insertions(+), 26 deletions(-) create mode 100644 aeon/anomaly_detection/distance_based/__init__.py rename aeon/anomaly_detection/{ => distance_based}/_cblof.py (100%) rename aeon/anomaly_detection/{ => distance_based}/_kmeans.py (100%) rename aeon/anomaly_detection/{ => distance_based}/_left_stampi.py (100%) rename aeon/anomaly_detection/{ => distance_based}/_lof.py (100%) rename aeon/anomaly_detection/{ => distance_based}/_merlin.py (100%) rename aeon/anomaly_detection/{ => distance_based}/_stomp.py (100%) create mode 100644 aeon/anomaly_detection/distance_based/tests/__init__.py rename aeon/anomaly_detection/{ => distance_based}/tests/test_cblof.py (100%) rename aeon/anomaly_detection/{ => distance_based}/tests/test_kmeans.py (100%) rename aeon/anomaly_detection/{ => distance_based}/tests/test_left_stampi.py (100%) rename aeon/anomaly_detection/{ => distance_based}/tests/test_lof.py (100%) rename aeon/anomaly_detection/{ => distance_based}/tests/test_merlin.py (100%) rename aeon/anomaly_detection/{ => distance_based}/tests/test_stomp.py (100%) create mode 100644 aeon/anomaly_detection/distribution_based/__init__.py rename aeon/anomaly_detection/{ => distribution_based}/_copod.py (100%) rename aeon/anomaly_detection/{ => distribution_based}/_dwt_mlead.py (100%) create mode 100644 aeon/anomaly_detection/distribution_based/tests/__init__.py rename aeon/anomaly_detection/{ => distribution_based}/tests/test_copod.py (100%) rename aeon/anomaly_detection/{ => distribution_based}/tests/test_dwt_mlead.py (100%) create mode 100644 aeon/anomaly_detection/outlier_detection/__init__.py rename aeon/anomaly_detection/{ => outlier_detection}/_iforest.py (100%) rename aeon/anomaly_detection/{ => outlier_detection}/_pyodadapter.py (100%) rename aeon/anomaly_detection/{ => outlier_detection}/_stray.py (100%) create mode 100644 aeon/anomaly_detection/outlier_detection/tests/__init__.py rename aeon/anomaly_detection/{ => outlier_detection}/tests/test_iforest.py (100%) rename aeon/anomaly_detection/{ => outlier_detection}/tests/test_pyod_adapter.py (100%) rename aeon/anomaly_detection/{ => outlier_detection}/tests/test_stray.py (100%) create mode 100644 aeon/anomaly_detection/sklearn_based/__init__.py rename aeon/anomaly_detection/{ => sklearn_based}/_one_class_svm.py (100%) create mode 100644 aeon/anomaly_detection/sklearn_based/tests/__init__.py rename aeon/anomaly_detection/{ => sklearn_based}/tests/test_one_class_svm.py (100%) create mode 100644 aeon/anomaly_detection/whole_series/__init__.py rename aeon/anomaly_detection/{ => whole_series}/_rockad.py (100%) create mode 100644 aeon/anomaly_detection/whole_series/tests/__init__.py rename aeon/anomaly_detection/{ => whole_series}/tests/test_rockad.py (100%) diff --git a/aeon/anomaly_detection/__init__.py b/aeon/anomaly_detection/__init__.py index c1f87846e7..65343cd774 100644 --- a/aeon/anomaly_detection/__init__.py +++ b/aeon/anomaly_detection/__init__.py @@ -1,31 +1,7 @@ """Time Series Anomaly Detection.""" __all__ = [ - "CBLOF", - "COPOD", - "DWT_MLEAD", - "IsolationForest", - "KMeansAD", - "LeftSTAMPi", - "LOF", - "MERLIN", - "OneClassSVM", - "ROCKAD", - "PyODAdapter", - "STOMP", - "STRAY", + "BaseAnomalyDetector", ] -from aeon.anomaly_detection._cblof import CBLOF -from aeon.anomaly_detection._copod import COPOD -from aeon.anomaly_detection._dwt_mlead import DWT_MLEAD -from aeon.anomaly_detection._iforest import IsolationForest -from aeon.anomaly_detection._kmeans import KMeansAD -from aeon.anomaly_detection._left_stampi import LeftSTAMPi -from aeon.anomaly_detection._lof import LOF -from aeon.anomaly_detection._merlin import MERLIN -from aeon.anomaly_detection._one_class_svm import OneClassSVM -from aeon.anomaly_detection._pyodadapter import PyODAdapter -from aeon.anomaly_detection._rockad import ROCKAD -from aeon.anomaly_detection._stomp import STOMP -from aeon.anomaly_detection._stray import STRAY +from aeon.anomaly_detection.base import BaseAnomalyDetector diff --git a/aeon/anomaly_detection/distance_based/__init__.py b/aeon/anomaly_detection/distance_based/__init__.py new file mode 100644 index 0000000000..037e8de34a --- /dev/null +++ b/aeon/anomaly_detection/distance_based/__init__.py @@ -0,0 +1,17 @@ +"""Distance basedTime Series Anomaly Detection.""" + +__all__ = [ + "CBLOF", + "KMeansAD", + "LeftSTAMPi", + "LOF", + "MERLIN", + "STOMP", +] + +from aeon.anomaly_detection.distance_based._cblof import CBLOF +from aeon.anomaly_detection.distance_based._kmeans import KMeansAD +from aeon.anomaly_detection.distance_based._left_stampi import LeftSTAMPi +from aeon.anomaly_detection.distance_based._lof import LOF +from aeon.anomaly_detection.distance_based._merlin import MERLIN +from aeon.anomaly_detection.distance_based._stomp import STOMP diff --git a/aeon/anomaly_detection/_cblof.py b/aeon/anomaly_detection/distance_based/_cblof.py similarity index 100% rename from aeon/anomaly_detection/_cblof.py rename to aeon/anomaly_detection/distance_based/_cblof.py diff --git a/aeon/anomaly_detection/_kmeans.py b/aeon/anomaly_detection/distance_based/_kmeans.py similarity index 100% rename from aeon/anomaly_detection/_kmeans.py rename to aeon/anomaly_detection/distance_based/_kmeans.py diff --git a/aeon/anomaly_detection/_left_stampi.py b/aeon/anomaly_detection/distance_based/_left_stampi.py similarity index 100% rename from aeon/anomaly_detection/_left_stampi.py rename to aeon/anomaly_detection/distance_based/_left_stampi.py diff --git a/aeon/anomaly_detection/_lof.py b/aeon/anomaly_detection/distance_based/_lof.py similarity index 100% rename from aeon/anomaly_detection/_lof.py rename to aeon/anomaly_detection/distance_based/_lof.py diff --git a/aeon/anomaly_detection/_merlin.py b/aeon/anomaly_detection/distance_based/_merlin.py similarity index 100% rename from aeon/anomaly_detection/_merlin.py rename to aeon/anomaly_detection/distance_based/_merlin.py diff --git a/aeon/anomaly_detection/_stomp.py b/aeon/anomaly_detection/distance_based/_stomp.py similarity index 100% rename from aeon/anomaly_detection/_stomp.py rename to aeon/anomaly_detection/distance_based/_stomp.py diff --git a/aeon/anomaly_detection/distance_based/tests/__init__.py b/aeon/anomaly_detection/distance_based/tests/__init__.py new file mode 100644 index 0000000000..03b6c4a5e8 --- /dev/null +++ b/aeon/anomaly_detection/distance_based/tests/__init__.py @@ -0,0 +1 @@ +"""Distance based test code.""" diff --git a/aeon/anomaly_detection/tests/test_cblof.py b/aeon/anomaly_detection/distance_based/tests/test_cblof.py similarity index 100% rename from aeon/anomaly_detection/tests/test_cblof.py rename to aeon/anomaly_detection/distance_based/tests/test_cblof.py diff --git a/aeon/anomaly_detection/tests/test_kmeans.py b/aeon/anomaly_detection/distance_based/tests/test_kmeans.py similarity index 100% rename from aeon/anomaly_detection/tests/test_kmeans.py rename to aeon/anomaly_detection/distance_based/tests/test_kmeans.py diff --git a/aeon/anomaly_detection/tests/test_left_stampi.py b/aeon/anomaly_detection/distance_based/tests/test_left_stampi.py similarity index 100% rename from aeon/anomaly_detection/tests/test_left_stampi.py rename to aeon/anomaly_detection/distance_based/tests/test_left_stampi.py diff --git a/aeon/anomaly_detection/tests/test_lof.py b/aeon/anomaly_detection/distance_based/tests/test_lof.py similarity index 100% rename from aeon/anomaly_detection/tests/test_lof.py rename to aeon/anomaly_detection/distance_based/tests/test_lof.py diff --git a/aeon/anomaly_detection/tests/test_merlin.py b/aeon/anomaly_detection/distance_based/tests/test_merlin.py similarity index 100% rename from aeon/anomaly_detection/tests/test_merlin.py rename to aeon/anomaly_detection/distance_based/tests/test_merlin.py diff --git a/aeon/anomaly_detection/tests/test_stomp.py b/aeon/anomaly_detection/distance_based/tests/test_stomp.py similarity index 100% rename from aeon/anomaly_detection/tests/test_stomp.py rename to aeon/anomaly_detection/distance_based/tests/test_stomp.py diff --git a/aeon/anomaly_detection/distribution_based/__init__.py b/aeon/anomaly_detection/distribution_based/__init__.py new file mode 100644 index 0000000000..e52a7512ba --- /dev/null +++ b/aeon/anomaly_detection/distribution_based/__init__.py @@ -0,0 +1,9 @@ +"""Distribution based Time Series Anomaly Detection.""" + +__all__ = [ + "COPOD", + "DWT_MLEAD", +] + +from aeon.anomaly_detection.distribution_based._copod import COPOD +from aeon.anomaly_detection.distribution_based._dwt_mlead import DWT_MLEAD diff --git a/aeon/anomaly_detection/_copod.py b/aeon/anomaly_detection/distribution_based/_copod.py similarity index 100% rename from aeon/anomaly_detection/_copod.py rename to aeon/anomaly_detection/distribution_based/_copod.py diff --git a/aeon/anomaly_detection/_dwt_mlead.py b/aeon/anomaly_detection/distribution_based/_dwt_mlead.py similarity index 100% rename from aeon/anomaly_detection/_dwt_mlead.py rename to aeon/anomaly_detection/distribution_based/_dwt_mlead.py diff --git a/aeon/anomaly_detection/distribution_based/tests/__init__.py b/aeon/anomaly_detection/distribution_based/tests/__init__.py new file mode 100644 index 0000000000..2f368970c0 --- /dev/null +++ b/aeon/anomaly_detection/distribution_based/tests/__init__.py @@ -0,0 +1 @@ +"""Distribution based test code.""" diff --git a/aeon/anomaly_detection/tests/test_copod.py b/aeon/anomaly_detection/distribution_based/tests/test_copod.py similarity index 100% rename from aeon/anomaly_detection/tests/test_copod.py rename to aeon/anomaly_detection/distribution_based/tests/test_copod.py diff --git a/aeon/anomaly_detection/tests/test_dwt_mlead.py b/aeon/anomaly_detection/distribution_based/tests/test_dwt_mlead.py similarity index 100% rename from aeon/anomaly_detection/tests/test_dwt_mlead.py rename to aeon/anomaly_detection/distribution_based/tests/test_dwt_mlead.py diff --git a/aeon/anomaly_detection/outlier_detection/__init__.py b/aeon/anomaly_detection/outlier_detection/__init__.py new file mode 100644 index 0000000000..ad9b7868e5 --- /dev/null +++ b/aeon/anomaly_detection/outlier_detection/__init__.py @@ -0,0 +1,11 @@ +"""Time Series Outlier Detection.""" + +__all__ = [ + "IsolationForest", + "PyODAdapter", + "STRAY", +] + +from aeon.anomaly_detection.outlier_detection._iforest import IsolationForest +from aeon.anomaly_detection.outlier_detection._pyodadapter import PyODAdapter +from aeon.anomaly_detection.outlier_detection._stray import STRAY diff --git a/aeon/anomaly_detection/_iforest.py b/aeon/anomaly_detection/outlier_detection/_iforest.py similarity index 100% rename from aeon/anomaly_detection/_iforest.py rename to aeon/anomaly_detection/outlier_detection/_iforest.py diff --git a/aeon/anomaly_detection/_pyodadapter.py b/aeon/anomaly_detection/outlier_detection/_pyodadapter.py similarity index 100% rename from aeon/anomaly_detection/_pyodadapter.py rename to aeon/anomaly_detection/outlier_detection/_pyodadapter.py diff --git a/aeon/anomaly_detection/_stray.py b/aeon/anomaly_detection/outlier_detection/_stray.py similarity index 100% rename from aeon/anomaly_detection/_stray.py rename to aeon/anomaly_detection/outlier_detection/_stray.py diff --git a/aeon/anomaly_detection/outlier_detection/tests/__init__.py b/aeon/anomaly_detection/outlier_detection/tests/__init__.py new file mode 100644 index 0000000000..7ac2efbbaa --- /dev/null +++ b/aeon/anomaly_detection/outlier_detection/tests/__init__.py @@ -0,0 +1 @@ +"""Outlier based test code.""" diff --git a/aeon/anomaly_detection/tests/test_iforest.py b/aeon/anomaly_detection/outlier_detection/tests/test_iforest.py similarity index 100% rename from aeon/anomaly_detection/tests/test_iforest.py rename to aeon/anomaly_detection/outlier_detection/tests/test_iforest.py diff --git a/aeon/anomaly_detection/tests/test_pyod_adapter.py b/aeon/anomaly_detection/outlier_detection/tests/test_pyod_adapter.py similarity index 100% rename from aeon/anomaly_detection/tests/test_pyod_adapter.py rename to aeon/anomaly_detection/outlier_detection/tests/test_pyod_adapter.py diff --git a/aeon/anomaly_detection/tests/test_stray.py b/aeon/anomaly_detection/outlier_detection/tests/test_stray.py similarity index 100% rename from aeon/anomaly_detection/tests/test_stray.py rename to aeon/anomaly_detection/outlier_detection/tests/test_stray.py diff --git a/aeon/anomaly_detection/sklearn_based/__init__.py b/aeon/anomaly_detection/sklearn_based/__init__.py new file mode 100644 index 0000000000..741008461f --- /dev/null +++ b/aeon/anomaly_detection/sklearn_based/__init__.py @@ -0,0 +1,7 @@ +"""Sklearn based Anomaly Detection.""" + +__all__ = [ + "OneClassSVM", +] + +from aeon.anomaly_detection.sklearn_based._one_class_svm import OneClassSVM diff --git a/aeon/anomaly_detection/_one_class_svm.py b/aeon/anomaly_detection/sklearn_based/_one_class_svm.py similarity index 100% rename from aeon/anomaly_detection/_one_class_svm.py rename to aeon/anomaly_detection/sklearn_based/_one_class_svm.py diff --git a/aeon/anomaly_detection/sklearn_based/tests/__init__.py b/aeon/anomaly_detection/sklearn_based/tests/__init__.py new file mode 100644 index 0000000000..fcea98aa73 --- /dev/null +++ b/aeon/anomaly_detection/sklearn_based/tests/__init__.py @@ -0,0 +1 @@ +"""Sklearn based test code.""" diff --git a/aeon/anomaly_detection/tests/test_one_class_svm.py b/aeon/anomaly_detection/sklearn_based/tests/test_one_class_svm.py similarity index 100% rename from aeon/anomaly_detection/tests/test_one_class_svm.py rename to aeon/anomaly_detection/sklearn_based/tests/test_one_class_svm.py diff --git a/aeon/anomaly_detection/whole_series/__init__.py b/aeon/anomaly_detection/whole_series/__init__.py new file mode 100644 index 0000000000..7098b8cd08 --- /dev/null +++ b/aeon/anomaly_detection/whole_series/__init__.py @@ -0,0 +1,7 @@ +"""Whole Time Series Anomaly Detection.""" + +__all__ = [ + "ROCKAD", +] + +from aeon.anomaly_detection.whole_series._rockad import ROCKAD diff --git a/aeon/anomaly_detection/_rockad.py b/aeon/anomaly_detection/whole_series/_rockad.py similarity index 100% rename from aeon/anomaly_detection/_rockad.py rename to aeon/anomaly_detection/whole_series/_rockad.py diff --git a/aeon/anomaly_detection/whole_series/tests/__init__.py b/aeon/anomaly_detection/whole_series/tests/__init__.py new file mode 100644 index 0000000000..9292e8d9bd --- /dev/null +++ b/aeon/anomaly_detection/whole_series/tests/__init__.py @@ -0,0 +1 @@ +"""Whole series anomaly detection tests.""" diff --git a/aeon/anomaly_detection/tests/test_rockad.py b/aeon/anomaly_detection/whole_series/tests/test_rockad.py similarity index 100% rename from aeon/anomaly_detection/tests/test_rockad.py rename to aeon/anomaly_detection/whole_series/tests/test_rockad.py From 055e963937fc39b2db8c054e9de41e35a0ea6e54 Mon Sep 17 00:00:00 2001 From: Kaustbh Date: Wed, 2 Apr 2025 12:18:24 +0530 Subject: [PATCH 2/6] updated documentation and references --- .../distance_based/_cblof.py | 2 +- .../distance_based/_kmeans.py | 2 +- .../distance_based/_left_stampi.py | 2 +- aeon/anomaly_detection/distance_based/_lof.py | 2 +- .../distance_based/_merlin.py | 2 +- .../distance_based/_stomp.py | 2 +- .../distance_based/tests/test_cblof.py | 2 +- .../distance_based/tests/test_kmeans.py | 2 +- .../distance_based/tests/test_left_stampi.py | 2 +- .../distance_based/tests/test_lof.py | 2 +- .../distance_based/tests/test_merlin.py | 2 +- .../distance_based/tests/test_stomp.py | 2 +- .../distribution_based/_copod.py | 2 +- .../distribution_based/_dwt_mlead.py | 2 +- .../distribution_based/tests/test_copod.py | 2 +- .../tests/test_dwt_mlead.py | 2 +- .../outlier_detection/_iforest.py | 2 +- .../outlier_detection/_pyodadapter.py | 2 +- .../outlier_detection/_stray.py | 2 +- .../outlier_detection/tests/test_iforest.py | 2 +- .../tests/test_pyod_adapter.py | 2 +- .../outlier_detection/tests/test_stray.py | 2 +- .../sklearn_based/tests/test_one_class_svm.py | 2 +- .../whole_series/tests/test_rockad.py | 2 +- docs/api_reference/anomaly_detection.rst | 58 ++++++++++++++++--- docs/developer_guide/adding_typehints.md | 2 +- docs/getting_started.md | 2 +- .../anomaly_detection/anomaly_detection.ipynb | 4 +- 28 files changed, 77 insertions(+), 37 deletions(-) diff --git a/aeon/anomaly_detection/distance_based/_cblof.py b/aeon/anomaly_detection/distance_based/_cblof.py index 506974f6ca..18bb044c14 100644 --- a/aeon/anomaly_detection/distance_based/_cblof.py +++ b/aeon/anomaly_detection/distance_based/_cblof.py @@ -7,7 +7,7 @@ import numpy as np -from aeon.anomaly_detection._pyodadapter import PyODAdapter +from aeon.anomaly_detection.outlier_detection._pyodadapter import PyODAdapter from aeon.utils.validation._dependencies import _check_soft_dependencies diff --git a/aeon/anomaly_detection/distance_based/_kmeans.py b/aeon/anomaly_detection/distance_based/_kmeans.py index c114911c3b..bb8f188a1d 100644 --- a/aeon/anomaly_detection/distance_based/_kmeans.py +++ b/aeon/anomaly_detection/distance_based/_kmeans.py @@ -65,7 +65,7 @@ class KMeansAD(BaseAnomalyDetector): Examples -------- >>> import numpy as np - >>> from aeon.anomaly_detection import KMeansAD + >>> from aeon.anomaly_detection.distance_based import KMeansAD >>> X = np.array([1, 2, 3, 4, 1, 2, 3, 3, 2, 8, 9, 8, 1, 2, 3, 4], dtype=np.float64) >>> detector = KMeansAD(n_clusters=3, window_size=4, stride=1, random_state=0) >>> detector.fit_predict(X) diff --git a/aeon/anomaly_detection/distance_based/_left_stampi.py b/aeon/anomaly_detection/distance_based/_left_stampi.py index d71cc5bd26..43078ce021 100644 --- a/aeon/anomaly_detection/distance_based/_left_stampi.py +++ b/aeon/anomaly_detection/distance_based/_left_stampi.py @@ -44,7 +44,7 @@ class LeftSTAMPi(BaseAnomalyDetector): Internally,this is applying the incremental approach outlined below. >>> import numpy as np # doctest: +SKIP - >>> from aeon.anomaly_detection import LeftSTAMPi # doctest: +SKIP + >>> from aeon.anomaly_detection.distance_based import LeftSTAMPi # doctest: +SKIP >>> X = np.random.default_rng(42).random((10)) # doctest: +SKIP >>> detector = LeftSTAMPi(window_size=3, n_init_train=3) # doctest: +SKIP >>> detector.fit_predict(X) # doctest: +SKIP diff --git a/aeon/anomaly_detection/distance_based/_lof.py b/aeon/anomaly_detection/distance_based/_lof.py index 99ac068584..2c3615d906 100644 --- a/aeon/anomaly_detection/distance_based/_lof.py +++ b/aeon/anomaly_detection/distance_based/_lof.py @@ -7,7 +7,7 @@ import numpy as np -from aeon.anomaly_detection._pyodadapter import PyODAdapter +from aeon.anomaly_detection.outlier_detection._pyodadapter import PyODAdapter from aeon.utils.validation._dependencies import _check_soft_dependencies diff --git a/aeon/anomaly_detection/distance_based/_merlin.py b/aeon/anomaly_detection/distance_based/_merlin.py index 5928d156d6..b63224acd5 100644 --- a/aeon/anomaly_detection/distance_based/_merlin.py +++ b/aeon/anomaly_detection/distance_based/_merlin.py @@ -43,7 +43,7 @@ class MERLIN(BaseAnomalyDetector): Examples -------- >>> import numpy as np - >>> from aeon.anomaly_detection import MERLIN + >>> from aeon.anomaly_detection.distance_based import MERLIN >>> X = np.array([1, 2, 3, 4, 1, 2, 3, 4, 2, 3, 4, 5, 1, 2, 3, 4]) >>> detector = MERLIN(min_length=4, max_length=5) >>> detector.fit_predict(X) diff --git a/aeon/anomaly_detection/distance_based/_stomp.py b/aeon/anomaly_detection/distance_based/_stomp.py index af39891149..3f8be36432 100644 --- a/aeon/anomaly_detection/distance_based/_stomp.py +++ b/aeon/anomaly_detection/distance_based/_stomp.py @@ -38,7 +38,7 @@ class STOMP(BaseAnomalyDetector): Examples -------- >>> import numpy as np - >>> from aeon.anomaly_detection import STOMP # doctest: +SKIP + >>> from aeon.anomaly_detection.distance_based import STOMP # doctest: +SKIP >>> X = np.random.default_rng(42).random((10, 2), dtype=np.float64) >>> detector = STOMP(X, window_size=2) # doctest: +SKIP >>> detector.fit_predict(X, axis=0) # doctest: +SKIP diff --git a/aeon/anomaly_detection/distance_based/tests/test_cblof.py b/aeon/anomaly_detection/distance_based/tests/test_cblof.py index c8d9f5d9c8..0ed27456ef 100644 --- a/aeon/anomaly_detection/distance_based/tests/test_cblof.py +++ b/aeon/anomaly_detection/distance_based/tests/test_cblof.py @@ -3,7 +3,7 @@ import numpy as np import pytest -from aeon.anomaly_detection import CBLOF +from aeon.anomaly_detection.distance_based import CBLOF from aeon.testing.data_generation import make_example_1d_numpy from aeon.utils.validation._dependencies import _check_soft_dependencies diff --git a/aeon/anomaly_detection/distance_based/tests/test_kmeans.py b/aeon/anomaly_detection/distance_based/tests/test_kmeans.py index 9812d7696b..2647411b88 100644 --- a/aeon/anomaly_detection/distance_based/tests/test_kmeans.py +++ b/aeon/anomaly_detection/distance_based/tests/test_kmeans.py @@ -6,7 +6,7 @@ import pytest from sklearn.utils import check_random_state -from aeon.anomaly_detection import KMeansAD +from aeon.anomaly_detection.distance_based import KMeansAD def test_kmeansad_univariate(): diff --git a/aeon/anomaly_detection/distance_based/tests/test_left_stampi.py b/aeon/anomaly_detection/distance_based/tests/test_left_stampi.py index 589d163f7b..6444bccdfe 100644 --- a/aeon/anomaly_detection/distance_based/tests/test_left_stampi.py +++ b/aeon/anomaly_detection/distance_based/tests/test_left_stampi.py @@ -8,7 +8,7 @@ import numpy as np import pytest -from aeon.anomaly_detection._left_stampi import LeftSTAMPi +from aeon.anomaly_detection.distance_based._left_stampi import LeftSTAMPi from aeon.testing.data_generation import make_example_1d_numpy from aeon.utils.validation._dependencies import _check_soft_dependencies diff --git a/aeon/anomaly_detection/distance_based/tests/test_lof.py b/aeon/anomaly_detection/distance_based/tests/test_lof.py index 846aa78a5a..033d11295b 100644 --- a/aeon/anomaly_detection/distance_based/tests/test_lof.py +++ b/aeon/anomaly_detection/distance_based/tests/test_lof.py @@ -3,7 +3,7 @@ import numpy as np import pytest -from aeon.anomaly_detection import LOF +from aeon.anomaly_detection.distance_based import LOF from aeon.testing.data_generation import make_example_1d_numpy from aeon.utils.validation._dependencies import _check_soft_dependencies diff --git a/aeon/anomaly_detection/distance_based/tests/test_merlin.py b/aeon/anomaly_detection/distance_based/tests/test_merlin.py index 20fe7c697e..ccf7e3300d 100644 --- a/aeon/anomaly_detection/distance_based/tests/test_merlin.py +++ b/aeon/anomaly_detection/distance_based/tests/test_merlin.py @@ -4,7 +4,7 @@ import numpy as np -from aeon.anomaly_detection import MERLIN +from aeon.anomaly_detection.distance_based import MERLIN TEST_DATA = np.array( [ diff --git a/aeon/anomaly_detection/distance_based/tests/test_stomp.py b/aeon/anomaly_detection/distance_based/tests/test_stomp.py index b1adfc1d12..b506c89ea0 100644 --- a/aeon/anomaly_detection/distance_based/tests/test_stomp.py +++ b/aeon/anomaly_detection/distance_based/tests/test_stomp.py @@ -6,7 +6,7 @@ import pytest from sklearn.utils import check_random_state -from aeon.anomaly_detection import STOMP +from aeon.anomaly_detection.distance_based import STOMP from aeon.utils.validation._dependencies import _check_soft_dependencies diff --git a/aeon/anomaly_detection/distribution_based/_copod.py b/aeon/anomaly_detection/distribution_based/_copod.py index ee448b96b8..bd2af0e084 100644 --- a/aeon/anomaly_detection/distribution_based/_copod.py +++ b/aeon/anomaly_detection/distribution_based/_copod.py @@ -7,7 +7,7 @@ import numpy as np -from aeon.anomaly_detection._pyodadapter import PyODAdapter +from aeon.anomaly_detection.outlier_detection._pyodadapter import PyODAdapter from aeon.utils.validation._dependencies import _check_soft_dependencies diff --git a/aeon/anomaly_detection/distribution_based/_dwt_mlead.py b/aeon/anomaly_detection/distribution_based/_dwt_mlead.py index e78bb1d7d9..cb0de0c015 100644 --- a/aeon/anomaly_detection/distribution_based/_dwt_mlead.py +++ b/aeon/anomaly_detection/distribution_based/_dwt_mlead.py @@ -78,7 +78,7 @@ class DWT_MLEAD(BaseAnomalyDetector): Examples -------- >>> import numpy as np - >>> from aeon.anomaly_detection import DWT_MLEAD + >>> from aeon.anomaly_detection.distribution_based import DWT_MLEAD >>> X = np.array([1, 2, 3, 4, 1, 2, 3, 3, 2, 8, 9, 8, 1, 2, 3, 4], dtype=np.float64) >>> detector = DWT_MLEAD( ... start_level=1, quantile_boundary_type='percentile', quantile_epsilon=0.01 diff --git a/aeon/anomaly_detection/distribution_based/tests/test_copod.py b/aeon/anomaly_detection/distribution_based/tests/test_copod.py index b1cddaa4dc..0ce82042e4 100644 --- a/aeon/anomaly_detection/distribution_based/tests/test_copod.py +++ b/aeon/anomaly_detection/distribution_based/tests/test_copod.py @@ -3,7 +3,7 @@ import numpy as np import pytest -from aeon.anomaly_detection import COPOD +from aeon.anomaly_detection.distribution_based import COPOD from aeon.testing.data_generation import make_example_1d_numpy from aeon.utils.validation._dependencies import _check_soft_dependencies diff --git a/aeon/anomaly_detection/distribution_based/tests/test_dwt_mlead.py b/aeon/anomaly_detection/distribution_based/tests/test_dwt_mlead.py index c5d09bddc2..664d715122 100644 --- a/aeon/anomaly_detection/distribution_based/tests/test_dwt_mlead.py +++ b/aeon/anomaly_detection/distribution_based/tests/test_dwt_mlead.py @@ -6,7 +6,7 @@ import pytest from sklearn.utils import check_random_state -from aeon.anomaly_detection import DWT_MLEAD +from aeon.anomaly_detection.distribution_based import DWT_MLEAD def test_dwt_mlead_output(): diff --git a/aeon/anomaly_detection/outlier_detection/_iforest.py b/aeon/anomaly_detection/outlier_detection/_iforest.py index a410c3542d..f13152d0e7 100644 --- a/aeon/anomaly_detection/outlier_detection/_iforest.py +++ b/aeon/anomaly_detection/outlier_detection/_iforest.py @@ -7,7 +7,7 @@ import numpy as np -from aeon.anomaly_detection._pyodadapter import PyODAdapter +from aeon.anomaly_detection.outlier_detection._pyodadapter import PyODAdapter from aeon.utils.validation._dependencies import _check_soft_dependencies diff --git a/aeon/anomaly_detection/outlier_detection/_pyodadapter.py b/aeon/anomaly_detection/outlier_detection/_pyodadapter.py index c520cc6f19..7ba990928b 100644 --- a/aeon/anomaly_detection/outlier_detection/_pyodadapter.py +++ b/aeon/anomaly_detection/outlier_detection/_pyodadapter.py @@ -59,7 +59,7 @@ class PyODAdapter(BaseAnomalyDetector): -------- >>> import numpy as np >>> from pyod.models.lof import LOF # doctest: +SKIP - >>> from aeon.anomaly_detection import PyODAdapter # doctest: +SKIP + >>> from aeon.anomaly_detection.distance_based import PyODAdapter # doctest: +SKIP >>> X = np.random.default_rng(42).random((10, 2), dtype=np.float64) >>> detector = PyODAdapter(LOF(), window_size=2) # doctest: +SKIP >>> detector.fit_predict(X, axis=0) # doctest: +SKIP diff --git a/aeon/anomaly_detection/outlier_detection/_stray.py b/aeon/anomaly_detection/outlier_detection/_stray.py index 2c5d669033..e7512e2d24 100644 --- a/aeon/anomaly_detection/outlier_detection/_stray.py +++ b/aeon/anomaly_detection/outlier_detection/_stray.py @@ -54,7 +54,7 @@ class STRAY(BaseAnomalyDetector): Examples -------- - >>> from aeon.anomaly_detection import STRAY + >>> from aeon.anomaly_detection.outlier_detection import STRAY >>> from aeon.datasets import load_airline >>> import numpy as np >>> X = load_airline() diff --git a/aeon/anomaly_detection/outlier_detection/tests/test_iforest.py b/aeon/anomaly_detection/outlier_detection/tests/test_iforest.py index 59c1121022..a66d1003fb 100644 --- a/aeon/anomaly_detection/outlier_detection/tests/test_iforest.py +++ b/aeon/anomaly_detection/outlier_detection/tests/test_iforest.py @@ -4,7 +4,7 @@ import pytest from sklearn.utils import check_random_state -from aeon.anomaly_detection import IsolationForest +from aeon.anomaly_detection.outlier_detection import IsolationForest from aeon.utils.validation._dependencies import _check_soft_dependencies diff --git a/aeon/anomaly_detection/outlier_detection/tests/test_pyod_adapter.py b/aeon/anomaly_detection/outlier_detection/tests/test_pyod_adapter.py index eff4d5b325..ee75078133 100644 --- a/aeon/anomaly_detection/outlier_detection/tests/test_pyod_adapter.py +++ b/aeon/anomaly_detection/outlier_detection/tests/test_pyod_adapter.py @@ -6,7 +6,7 @@ import pytest from sklearn.utils import check_random_state -from aeon.anomaly_detection import PyODAdapter +from aeon.anomaly_detection.outlier_detection import PyODAdapter from aeon.utils.validation._dependencies import _check_soft_dependencies diff --git a/aeon/anomaly_detection/outlier_detection/tests/test_stray.py b/aeon/anomaly_detection/outlier_detection/tests/test_stray.py index cbf6caabb3..8429a8a3c5 100644 --- a/aeon/anomaly_detection/outlier_detection/tests/test_stray.py +++ b/aeon/anomaly_detection/outlier_detection/tests/test_stray.py @@ -5,7 +5,7 @@ import numpy as np from sklearn.preprocessing import MinMaxScaler -from aeon.anomaly_detection import STRAY +from aeon.anomaly_detection.outlier_detection import STRAY def test_default_1D(): diff --git a/aeon/anomaly_detection/sklearn_based/tests/test_one_class_svm.py b/aeon/anomaly_detection/sklearn_based/tests/test_one_class_svm.py index c99f0ff755..ff9aec1d41 100644 --- a/aeon/anomaly_detection/sklearn_based/tests/test_one_class_svm.py +++ b/aeon/anomaly_detection/sklearn_based/tests/test_one_class_svm.py @@ -4,7 +4,7 @@ import pytest from sklearn.utils import check_random_state -from aeon.anomaly_detection import OneClassSVM +from aeon.anomaly_detection.sklearn_based import OneClassSVM def test_one_class_svm_univariate(): diff --git a/aeon/anomaly_detection/whole_series/tests/test_rockad.py b/aeon/anomaly_detection/whole_series/tests/test_rockad.py index d9d133b9a8..7d3694b2c8 100644 --- a/aeon/anomaly_detection/whole_series/tests/test_rockad.py +++ b/aeon/anomaly_detection/whole_series/tests/test_rockad.py @@ -4,7 +4,7 @@ import pytest from sklearn.utils import check_random_state -from aeon.anomaly_detection import ROCKAD +from aeon.anomaly_detection.whole_series import ROCKAD def test_rockad_univariate(): diff --git a/docs/api_reference/anomaly_detection.rst b/docs/api_reference/anomaly_detection.rst index 082c082fc4..6f6d38faa5 100644 --- a/docs/api_reference/anomaly_detection.rst +++ b/docs/api_reference/anomaly_detection.rst @@ -13,29 +13,69 @@ Each detector in this module specifies its supported input data format, output d format, and learning type as an overview table in its documentation. Some detectors support multiple learning types. -Detectors ---------- +Distance-based +-------------- -.. currentmodule:: aeon.anomaly_detection +.. currentmodule:: aeon.anomaly_detection.distance_based .. autosummary:: :toctree: auto_generated/ :template: class.rst CBLOF - COPOD - DWT_MLEAD - IsolationForest KMeansAD LeftSTAMPi LOF MERLIN - OneClassSVM - PyODAdapter - ROCKAD STOMP + +Distributin-based +----------------- + +.. currentmodule:: aeon.anomaly_detection.distribution_based + +.. autosummary:: + :toctree: auto_generated/ + :template: class.rst + + COPOD + DWT_MLEAD + +Outlier-Detection +----------------- + +.. currentmodule:: aeon.anomaly_detection.outlier_detection + +.. autosummary:: + :toctree: auto_generated/ + :template: class.rst + + IsolationForest + PyODAdapter STRAY +Sklearn-based +------------- + +.. currentmodule:: aeon.anomaly_detection.sklearn_based + +.. autosummary:: + :toctree: auto_generated/ + :template: class.rst + + OneClassSVM + +Whole-Series +------------ + +.. currentmodule:: aeon.anomaly_detection.whole_series + +.. autosummary:: + :toctree: auto_generated/ + :template: class.rst + + ROCKAD + Base ---- diff --git a/docs/developer_guide/adding_typehints.md b/docs/developer_guide/adding_typehints.md index f3557ddbd9..5f77ce119b 100644 --- a/docs/developer_guide/adding_typehints.md +++ b/docs/developer_guide/adding_typehints.md @@ -25,7 +25,7 @@ When working with modules that use soft dependencies, additional considerations required to ensure that your code can still run even without these dependencies installed. -Here is an example snippet taken from [PyODAdapter](https://www.aeon-toolkit.org/en/stable/api_reference/auto_generated/aeon.anomaly_detection.PyODAdapter.html). +Here is an example snippet taken from [PyODAdapter](https://www.aeon-toolkit.org/en/stable/api_reference/auto_generated/aeon.anomaly_detection.outlier_detection.PyODAdapter.html). It uses the `pyod` library, which is a soft dependency. The `TYPE_CHECKING` constant is used to ensure that the `pyod` library is only imported at the top level while type checking is performed. `from __future__ import annotations` is used to allow forward diff --git a/docs/getting_started.md b/docs/getting_started.md index 36f18583cb..cf74ab9319 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -114,7 +114,7 @@ written the notebook. ```{code-block} python >>> from aeon.datasets import load_airline ->>> from aeon.anomaly_detection import STOMP +>>> from aeon.anomaly_detection.distance_based import STOMP >>> stomp = STOMP(window_size=200) >>> scores = est.fit_predict(X) # Get the anomaly scores ``` diff --git a/examples/anomaly_detection/anomaly_detection.ipynb b/examples/anomaly_detection/anomaly_detection.ipynb index 9f393437e9..7afd00aff8 100644 --- a/examples/anomaly_detection/anomaly_detection.ipynb +++ b/examples/anomaly_detection/anomaly_detection.ipynb @@ -185,7 +185,7 @@ "metadata": {}, "outputs": [], "source": [ - "from aeon.anomaly_detection import STOMP\n", + "from aeon.anomaly_detection.distance_based import STOMP\n", "from aeon.benchmarking.metrics.anomaly_detection import range_roc_auc_score\n", "\n", "detector = STOMP(window_size=200)\n", @@ -211,7 +211,7 @@ "source": [ "from pyod.models.ocsvm import OCSVM\n", "\n", - "from aeon.anomaly_detection import PyODAdapter\n", + "from aeon.anomaly_detection.outlier_detection import PyODAdapter\n", "from aeon.benchmarking.metrics.anomaly_detection import range_roc_auc_score\n", "\n", "detector = PyODAdapter(OCSVM(), window_size=3)\n", From cc7fc9dc87b38d1f82eb7152f7bfdd2e748824b8 Mon Sep 17 00:00:00 2001 From: Kaustbh Date: Tue, 8 Apr 2025 02:20:27 +0530 Subject: [PATCH 3/6] implemented suggested changes --- aeon/anomaly_detection/distance_based/__init__.py | 2 ++ .../_one_class_svm.py | 0 .../tests/test_one_class_svm.py | 2 +- .../outlier_detection/_pyodadapter.py | 2 +- aeon/anomaly_detection/sklearn_based/__init__.py | 7 ------- .../sklearn_based/tests/__init__.py | 1 - docs/api_reference/anomaly_detection.rst | 14 ++------------ 7 files changed, 6 insertions(+), 22 deletions(-) rename aeon/anomaly_detection/{sklearn_based => distance_based}/_one_class_svm.py (100%) rename aeon/anomaly_detection/{sklearn_based => distance_based}/tests/test_one_class_svm.py (95%) delete mode 100644 aeon/anomaly_detection/sklearn_based/__init__.py delete mode 100644 aeon/anomaly_detection/sklearn_based/tests/__init__.py diff --git a/aeon/anomaly_detection/distance_based/__init__.py b/aeon/anomaly_detection/distance_based/__init__.py index 037e8de34a..5eb342b780 100644 --- a/aeon/anomaly_detection/distance_based/__init__.py +++ b/aeon/anomaly_detection/distance_based/__init__.py @@ -6,6 +6,7 @@ "LeftSTAMPi", "LOF", "MERLIN", + "OneClassSVM", "STOMP", ] @@ -14,4 +15,5 @@ from aeon.anomaly_detection.distance_based._left_stampi import LeftSTAMPi from aeon.anomaly_detection.distance_based._lof import LOF from aeon.anomaly_detection.distance_based._merlin import MERLIN +from aeon.anomaly_detection.distance_based._one_class_svm import OneClassSVM from aeon.anomaly_detection.distance_based._stomp import STOMP diff --git a/aeon/anomaly_detection/sklearn_based/_one_class_svm.py b/aeon/anomaly_detection/distance_based/_one_class_svm.py similarity index 100% rename from aeon/anomaly_detection/sklearn_based/_one_class_svm.py rename to aeon/anomaly_detection/distance_based/_one_class_svm.py diff --git a/aeon/anomaly_detection/sklearn_based/tests/test_one_class_svm.py b/aeon/anomaly_detection/distance_based/tests/test_one_class_svm.py similarity index 95% rename from aeon/anomaly_detection/sklearn_based/tests/test_one_class_svm.py rename to aeon/anomaly_detection/distance_based/tests/test_one_class_svm.py index ff9aec1d41..7a3aca2042 100644 --- a/aeon/anomaly_detection/sklearn_based/tests/test_one_class_svm.py +++ b/aeon/anomaly_detection/distance_based/tests/test_one_class_svm.py @@ -4,7 +4,7 @@ import pytest from sklearn.utils import check_random_state -from aeon.anomaly_detection.sklearn_based import OneClassSVM +from aeon.anomaly_detection.distance_based import OneClassSVM def test_one_class_svm_univariate(): diff --git a/aeon/anomaly_detection/outlier_detection/_pyodadapter.py b/aeon/anomaly_detection/outlier_detection/_pyodadapter.py index 7ba990928b..e12603b0f2 100644 --- a/aeon/anomaly_detection/outlier_detection/_pyodadapter.py +++ b/aeon/anomaly_detection/outlier_detection/_pyodadapter.py @@ -59,7 +59,7 @@ class PyODAdapter(BaseAnomalyDetector): -------- >>> import numpy as np >>> from pyod.models.lof import LOF # doctest: +SKIP - >>> from aeon.anomaly_detection.distance_based import PyODAdapter # doctest: +SKIP + >>> from aeon.anomaly_detection.outlier_detection import PyODAdapter # doctest: +SKIP # noqa: E501 >>> X = np.random.default_rng(42).random((10, 2), dtype=np.float64) >>> detector = PyODAdapter(LOF(), window_size=2) # doctest: +SKIP >>> detector.fit_predict(X, axis=0) # doctest: +SKIP diff --git a/aeon/anomaly_detection/sklearn_based/__init__.py b/aeon/anomaly_detection/sklearn_based/__init__.py deleted file mode 100644 index 741008461f..0000000000 --- a/aeon/anomaly_detection/sklearn_based/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -"""Sklearn based Anomaly Detection.""" - -__all__ = [ - "OneClassSVM", -] - -from aeon.anomaly_detection.sklearn_based._one_class_svm import OneClassSVM diff --git a/aeon/anomaly_detection/sklearn_based/tests/__init__.py b/aeon/anomaly_detection/sklearn_based/tests/__init__.py deleted file mode 100644 index fcea98aa73..0000000000 --- a/aeon/anomaly_detection/sklearn_based/tests/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Sklearn based test code.""" diff --git a/docs/api_reference/anomaly_detection.rst b/docs/api_reference/anomaly_detection.rst index 6f6d38faa5..974d216b43 100644 --- a/docs/api_reference/anomaly_detection.rst +++ b/docs/api_reference/anomaly_detection.rst @@ -27,9 +27,10 @@ Distance-based LeftSTAMPi LOF MERLIN + OneCLassSVM STOMP -Distributin-based +Distribution-based ----------------- .. currentmodule:: aeon.anomaly_detection.distribution_based @@ -54,17 +55,6 @@ Outlier-Detection PyODAdapter STRAY -Sklearn-based -------------- - -.. currentmodule:: aeon.anomaly_detection.sklearn_based - -.. autosummary:: - :toctree: auto_generated/ - :template: class.rst - - OneClassSVM - Whole-Series ------------ From 2890c0f4288c961dfacaaded8cf882593fb7b079 Mon Sep 17 00:00:00 2001 From: Kaustbh Date: Tue, 8 Apr 2025 12:43:42 +0530 Subject: [PATCH 4/6] minor changes --- aeon/anomaly_detection/outlier_detection/_pyodadapter.py | 4 +++- docs/api_reference/anomaly_detection.rst | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/aeon/anomaly_detection/outlier_detection/_pyodadapter.py b/aeon/anomaly_detection/outlier_detection/_pyodadapter.py index e12603b0f2..5a068857c6 100644 --- a/aeon/anomaly_detection/outlier_detection/_pyodadapter.py +++ b/aeon/anomaly_detection/outlier_detection/_pyodadapter.py @@ -59,7 +59,9 @@ class PyODAdapter(BaseAnomalyDetector): -------- >>> import numpy as np >>> from pyod.models.lof import LOF # doctest: +SKIP - >>> from aeon.anomaly_detection.outlier_detection import PyODAdapter # doctest: +SKIP # noqa: E501 + >>> from aeon.anomaly_detection.outlier_detection import ( + ... PyODAdapter + ... ) # doctest: +SKIP >>> X = np.random.default_rng(42).random((10, 2), dtype=np.float64) >>> detector = PyODAdapter(LOF(), window_size=2) # doctest: +SKIP >>> detector.fit_predict(X, axis=0) # doctest: +SKIP diff --git a/docs/api_reference/anomaly_detection.rst b/docs/api_reference/anomaly_detection.rst index 974d216b43..029c3d1a4c 100644 --- a/docs/api_reference/anomaly_detection.rst +++ b/docs/api_reference/anomaly_detection.rst @@ -27,7 +27,7 @@ Distance-based LeftSTAMPi LOF MERLIN - OneCLassSVM + OneClassSVM STOMP Distribution-based From f11c765a94ad0b348a4a84d35d5f69e979a8c48a Mon Sep 17 00:00:00 2001 From: Kaustbh Date: Sun, 13 Apr 2025 09:49:35 +0530 Subject: [PATCH 5/6] added headers for remaining algorithm family --- docs/api_reference/anomaly_detection.rst | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/api_reference/anomaly_detection.rst b/docs/api_reference/anomaly_detection.rst index 029c3d1a4c..b43b980bb6 100644 --- a/docs/api_reference/anomaly_detection.rst +++ b/docs/api_reference/anomaly_detection.rst @@ -13,6 +13,11 @@ Each detector in this module specifies its supported input data format, output d format, and learning type as an overview table in its documentation. Some detectors support multiple learning types. +.. note:: + + Not all algorithm families are currently implemented. The documentation includes + placeholders for planned categories which will be supported in future. + Distance-based -------------- @@ -42,6 +47,16 @@ Distribution-based COPOD DWT_MLEAD +Encoding-based +-------------- + +The algorithms for this family are not implemented yet. + +Forecasting-based +----------------- + +The algorithms for this family are not implemented yet. + Outlier-Detection ----------------- @@ -55,6 +70,16 @@ Outlier-Detection PyODAdapter STRAY +Reconstruction-based +-------------------- + +The algorithms for this family are not implemented yet. + +Trees-based +----------- + +The algorithms for this family are not implemented yet. + Whole-Series ------------ From d95fa203467ea28dcac659c47284a2f1989033c9 Mon Sep 17 00:00:00 2001 From: Kaustbh Date: Sun, 13 Apr 2025 21:29:05 +0530 Subject: [PATCH 6/6] removing tree-based header --- docs/api_reference/anomaly_detection.rst | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs/api_reference/anomaly_detection.rst b/docs/api_reference/anomaly_detection.rst index b43b980bb6..3e22c445b7 100644 --- a/docs/api_reference/anomaly_detection.rst +++ b/docs/api_reference/anomaly_detection.rst @@ -75,11 +75,6 @@ Reconstruction-based The algorithms for this family are not implemented yet. -Trees-based ------------ - -The algorithms for this family are not implemented yet. - Whole-Series ------------