From d3647a168495cb6d97b873cb37aff08b3b21ecfd Mon Sep 17 00:00:00 2001 From: Tony Bagnall Date: Thu, 28 Nov 2024 19:56:40 +0000 Subject: [PATCH] [ENH] Refactor BinSegSegmenter to BinSegmenter (#2408) * BinSegmenter * BinSegmenter exclusion * docs * Empty commit for CI * Empty commit for CI * Empty commit for CI --------- Co-authored-by: MatthewMiddlehurst --- aeon/segmentation/__init__.py | 4 ++-- aeon/segmentation/_binseg.py | 8 ++++---- aeon/segmentation/tests/test_binseg.py | 4 ++-- aeon/testing/testing_config.py | 2 +- docs/api_reference/segmentation.rst | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/aeon/segmentation/__init__.py b/aeon/segmentation/__init__.py index 46354b7bf5..b3ec8b5e12 100644 --- a/aeon/segmentation/__init__.py +++ b/aeon/segmentation/__init__.py @@ -2,7 +2,7 @@ __all__ = [ "BaseSegmenter", - "BinSegSegmenter", + "BinSegmenter", "FLUSSSegmenter", "ClaSPSegmenter", "find_dominant_window_sizes", @@ -15,7 +15,7 @@ "HidalgoSegmenter", ] -from aeon.segmentation._binseg import BinSegSegmenter +from aeon.segmentation._binseg import BinSegmenter from aeon.segmentation._clasp import ClaSPSegmenter, find_dominant_window_sizes from aeon.segmentation._eagglo import EAggloSegmenter from aeon.segmentation._fluss import FLUSSSegmenter diff --git a/aeon/segmentation/_binseg.py b/aeon/segmentation/_binseg.py index af64959000..b7e3d520d9 100644 --- a/aeon/segmentation/_binseg.py +++ b/aeon/segmentation/_binseg.py @@ -1,7 +1,7 @@ """BinSeg (Binary segmentation) Segmenter.""" __maintainer__ = [] -__all__ = ["BinSegSegmenter"] +__all__ = ["BinSegmenter"] import numpy as np import pandas as pd @@ -9,7 +9,7 @@ from aeon.segmentation.base import BaseSegmenter -class BinSegSegmenter(BaseSegmenter): +class BinSegmenter(BaseSegmenter): """BinSeg (Binary Segmentation) Segmenter. From the Ruptures documentation: @@ -46,10 +46,10 @@ class BinSegSegmenter(BaseSegmenter): Examples -------- - >>> from aeon.segmentation import BinSegSegmenter + >>> from aeon.segmentation import BinSegmenter >>> from aeon.datasets import load_gun_point_segmentation >>> X, true_period_size, cps = load_gun_point_segmentation() - >>> binseg = BinSegSegmenter(n_cps=1) # doctest: +SKIP + >>> binseg = BinSegmenter(n_cps=1) # doctest: +SKIP >>> found_cps = binseg.fit_predict(X) # doctest: +SKIP """ diff --git a/aeon/segmentation/tests/test_binseg.py b/aeon/segmentation/tests/test_binseg.py index 0452383747..eb9ad78fee 100644 --- a/aeon/segmentation/tests/test_binseg.py +++ b/aeon/segmentation/tests/test_binseg.py @@ -6,7 +6,7 @@ import pytest from aeon.datasets import load_gun_point_segmentation -from aeon.segmentation import BinSegSegmenter +from aeon.segmentation import BinSegmenter from aeon.utils.validation._dependencies import _check_soft_dependencies @@ -23,7 +23,7 @@ def test_binseg_sparse(): ts, _, cps = load_gun_point_segmentation() # compute a BinSeg segmentation - binseg = BinSegSegmenter(n_cps=1) + binseg = BinSegmenter(n_cps=1) found_cps = binseg.fit_predict(ts) assert len(found_cps) == 1 and found_cps[0] == 1870 diff --git a/aeon/testing/testing_config.py b/aeon/testing/testing_config.py index 41477dead2..671d2c2a0a 100644 --- a/aeon/testing/testing_config.py +++ b/aeon/testing/testing_config.py @@ -56,7 +56,7 @@ "GreedyGaussianSegmenter": ["check_non_state_changing_method"], "ClaSPSegmenter": ["check_non_state_changing_method"], "HMMSegmenter": ["check_non_state_changing_method"], - "BinSegSegmenter": ["check_non_state_changing_method"], + "BinSegmenter": ["check_non_state_changing_method"], "QUANTTransformer": ["check_non_state_changing_method"], "MatrixProfileSeriesTransformer": ["check_non_state_changing_method"], "PLASeriesTransformer": ["check_non_state_changing_method"], diff --git a/docs/api_reference/segmentation.rst b/docs/api_reference/segmentation.rst index a245918ae3..2e892be0d8 100644 --- a/docs/api_reference/segmentation.rst +++ b/docs/api_reference/segmentation.rst @@ -13,7 +13,7 @@ contains algorithms and tools for time series segmentation. :toctree: auto_generated/ :template: class.rst - BinSegSegmenter + BinSegmenter ClaSPSegmenter FLUSSSegmenter InformationGainSegmenter