Skip to content

Commit

Permalink
regression and segmentation api (#2399)
Browse files Browse the repository at this point in the history
Co-authored-by: Tony Bagnall <[email protected]>
  • Loading branch information
MatthewMiddlehurst and TonyBagnall authored Nov 27, 2024
1 parent f4d2daa commit 8a613f6
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 37 deletions.
5 changes: 4 additions & 1 deletion aeon/regression/compose/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
"""Implement composite time series regression estimators."""

__all__ = ["RegressorEnsemble", "RegressorPipeline"]
__all__ = [
"RegressorEnsemble",
"RegressorPipeline",
]

from aeon.regression.compose._ensemble import RegressorEnsemble
from aeon.regression.compose._pipeline import RegressorPipeline
2 changes: 2 additions & 0 deletions aeon/regression/sklearn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

__all__ = [
"RotationForestRegressor",
"SklearnRegressorWrapper",
]

from aeon.regression.sklearn._rotation_forest_regressor import RotationForestRegressor
from aeon.regression.sklearn._wrapper import SklearnRegressorWrapper
4 changes: 2 additions & 2 deletions aeon/regression/sklearn/_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class SklearnRegressorWrapper(BaseRegressor):
"""

_tags = {
"X_inner_type": ["np-list", "numpy3D"],
"X_inner_type": "numpy2D",
}

def __init__(self, regressor, random_state=None):
Expand All @@ -35,7 +35,7 @@ def __init__(self, regressor, random_state=None):

super().__init__()

def _fit(self, X, y=None):
def _fit(self, X, y):
self.regressor_ = _clone_estimator(self.regressor, self.random_state)
self.regressor_.fit(X, y)
return self
Expand Down
66 changes: 34 additions & 32 deletions docs/api_reference/regression.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,6 @@ All regressors in ``aeon``can be listed using the ``aeon.registry.all_estimators
using ``estimator_types="regressor"``, optionally filtered by tags.
Valid tags can be listed using ``aeon.registry.all_tags``.

Base
----

.. currentmodule:: aeon.regression.base

.. autosummary::
:toctree: auto_generated/
:template: class.rst

BaseRegressor

.. currentmodule:: aeon.regression.deep_learning.base

.. autosummary::
:toctree: auto_generated/
:template: class.rst

BaseDeepRegressor


Convolution-based
-----------------

Expand All @@ -53,7 +33,6 @@ Deep learning
:toctree: auto_generated/
:template: class.rst

BaseDeepRegressor
TimeCNNRegressor
EncoderRegressor
FCNRegressor
Expand All @@ -76,17 +55,6 @@ Distance-based

KNeighborsTimeSeriesRegressor

Dummy
-----

.. currentmodule:: aeon.regression

.. autosummary::
:toctree: auto_generated/
:template: class.rst

DummyRegressor

Feature-based
--------------

Expand Down Expand Up @@ -128,6 +96,7 @@ Interval-based
RandomIntervalRegressor
RandomIntervalSpectralEnsembleRegressor
TimeSeriesForestRegressor
QUANTRegressor

Shapelet-based
--------------
Expand All @@ -151,3 +120,36 @@ sklearn
:template: class.rst

RotationForestRegressor
SklearnRegressorWrapper

Compose
-------

.. currentmodule:: aeon.regression.compose

.. autosummary::
:toctree: auto_generated/
:template: class.rst

RegressorEnsemble
RegressorPipeline

Base
----

.. currentmodule:: aeon.regression.base

.. autosummary::
:toctree: auto_generated/
:template: class.rst

BaseRegressor
DummyRegressor

.. currentmodule:: aeon.regression.deep_learning.base

.. autosummary::
:toctree: auto_generated/
:template: class.rst

BaseDeepRegressor
14 changes: 12 additions & 2 deletions docs/api_reference/segmentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,23 @@ contains algorithms and tools for time series segmentation.
:toctree: auto_generated/
:template: class.rst

BaseSegmenter
BinSegmenter
ClaSPSegmenter
FLUSSSegmenter
InformationGainSegmenter
GreedyGaussianSegmenter
DummySegmenter
EAggloSegmenter
HMMSegmenter
HidalgoSegmenter
RandomSegmenter

Base
----

.. currentmodule:: aeon.segmentation.base

.. autosummary::
:toctree: auto_generated/
:template: class.rst

BaseSegmenter

0 comments on commit 8a613f6

Please sign in to comment.