Skip to content

Commit

Permalink
[ENH] Refactor BinSegSegmenter to BinSegmenter (#2408)
Browse files Browse the repository at this point in the history
* BinSegmenter

* BinSegmenter exclusion

* docs

* Empty commit for CI

* Empty commit for CI

* Empty commit for CI

---------

Co-authored-by: MatthewMiddlehurst <[email protected]>
  • Loading branch information
TonyBagnall and MatthewMiddlehurst authored Nov 28, 2024
1 parent 6c22d20 commit d3647a1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions aeon/segmentation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__all__ = [
"BaseSegmenter",
"BinSegSegmenter",
"BinSegmenter",
"FLUSSSegmenter",
"ClaSPSegmenter",
"find_dominant_window_sizes",
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions aeon/segmentation/_binseg.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
"""BinSeg (Binary segmentation) Segmenter."""

__maintainer__ = []
__all__ = ["BinSegSegmenter"]
__all__ = ["BinSegmenter"]

import numpy as np
import pandas as pd

from aeon.segmentation.base import BaseSegmenter


class BinSegSegmenter(BaseSegmenter):
class BinSegmenter(BaseSegmenter):
"""BinSeg (Binary Segmentation) Segmenter.
From the Ruptures documentation:
Expand Down Expand Up @@ -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
"""

Expand Down
4 changes: 2 additions & 2 deletions aeon/segmentation/tests/test_binseg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -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
2 changes: 1 addition & 1 deletion aeon/testing/testing_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
2 changes: 1 addition & 1 deletion docs/api_reference/segmentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ contains algorithms and tools for time series segmentation.
:toctree: auto_generated/
:template: class.rst

BinSegSegmenter
BinSegmenter
ClaSPSegmenter
FLUSSSegmenter
InformationGainSegmenter
Expand Down

0 comments on commit d3647a1

Please sign in to comment.