diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 330eb67804..5bee66a28d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,7 +29,7 @@ repos: args: [ "--create", "--python-folders", "aeon" ] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.2 + rev: v0.8.3 hooks: - id: ruff args: [ "--fix"] diff --git a/README.md b/README.md index cc6d8a909d..9e64047b9b 100644 --- a/README.md +++ b/README.md @@ -149,3 +149,8 @@ If you use `aeon` we would appreciate a citation of the following [paper](https: ``` If you let us know about your paper using `aeon`, we will happily list it [here](https://www.aeon-toolkit.org/en/stable/papers_using_aeon.html). + +## 💬 Further information + +`aeon` was forked from `sktime` `v0.16.0` in 2022 by an initial group of eight core +developers. diff --git a/aeon/classification/deep_learning/_lite_time.py b/aeon/classification/deep_learning/_lite_time.py index ac1594ecd7..675c5d2602 100644 --- a/aeon/classification/deep_learning/_lite_time.py +++ b/aeon/classification/deep_learning/_lite_time.py @@ -96,11 +96,13 @@ class LITETimeClassifier(BaseClassifier): The keras optimizer used for training. loss : str, default = "categorical_crossentropy" The name of the keras training loss. - metrics : str or list[str], default="accuracy" - The evaluation metrics to use during training. If - a single string metric is provided, it will be - used as the only metric. If a list of metrics are - provided, all will be used for evaluation. + metrics : str or list[str|function|keras.metrics.Metric], default="accuracy" + the evaluation metrics to use during training. each of this can be a + string, function or a keras.metrics.metric instance (for details, see + https://keras.io/api/metrics/). + if a single string metric is provided, it will be used as the only + metric. if a list of metrics are provided, all will be used for + evaluation. References ---------- @@ -398,11 +400,13 @@ class IndividualLITEClassifier(BaseDeepClassifier): The keras optimizer used for training. loss : str, default = "categorical_crossentropy" The name of the keras training loss. - metrics : str or list[str], default="accuracy" - The evaluation metrics to use during training. If - a single string metric is provided, it will be - used as the only metric. If a list of metrics are - provided, all will be used for evaluation. + metrics : str or list[str|function|keras.metrics.Metric], default="accuracy" + the evaluation metrics to use during training. each of this can be a + string, function or a keras.metrics.metric instance (for details, see + https://keras.io/api/metrics/). + if a single string metric is provided, it will be used as the only + metric. if a list of metrics are provided, all will be used for + evaluation. References ---------- diff --git a/aeon/regression/base.py b/aeon/regression/base.py index 7f9521b5ee..5aed9c80b9 100644 --- a/aeon/regression/base.py +++ b/aeon/regression/base.py @@ -76,7 +76,7 @@ def fit(self, X, y) -> BaseCollectionEstimator: allowed and converted into one of the above. Different estimators have different capabilities to handle different - types of input. If `self.get_tag("capability:multivariate")`` is False, + types of input. If ``self.get_tag("capability:multivariate")`` is False, they cannot handle multivariate series, so either ``n_channels == 1`` is true or X is 2D of shape ``(n_cases, n_timepoints)``. If ``self.get_tag( "capability:unequal_length")`` is False, they cannot handle unequal @@ -122,7 +122,7 @@ def predict(self, X) -> np.ndarray: other types are allowed and converted into one of the above. Different estimators have different capabilities to handle different - types of input. If `self.get_tag("capability:multivariate")`` is False, + types of input. If ``self.get_tag("capability:multivariate")`` is False, they cannot handle multivariate series, so either ``n_channels == 1`` is true or X is 2D of shape ``(n_cases, n_timepoints)``. If ``self.get_tag( "capability:unequal_length")`` is False, they cannot handle unequal diff --git a/aeon/transformations/collection/base.py b/aeon/transformations/collection/base.py index e6c774fee9..013001d80e 100644 --- a/aeon/transformations/collection/base.py +++ b/aeon/transformations/collection/base.py @@ -62,20 +62,19 @@ def fit(self, X, y=None): Parameters ---------- X : np.ndarray or list - Input data, any number of channels, equal length series of shape ``( - n_cases, n_channels, n_timepoints)`` - or list of numpy arrays (any number of channels, unequal length series) - of shape ``[n_cases]``, 2D np.array ``(n_channels, n_timepoints_i)``, - where ``n_timepoints_i`` is length of series ``i``. Other types are - allowed and converted into one of the above. + Data to fit transform to, of valid collection type. Input data, + any number of channels, equal length series of shape ``( + n_cases, n_channels, n_timepoints)`` or list of numpy arrays (any number + of channels, unequal length series) of shape ``[n_cases]``, 2D np.array + ``(n_channels, n_timepoints_i)``, where ``n_timepoints_i`` is length of + series ``i``. Other types are allowed and converted into one of the above. Different estimators have different capabilities to handle different - types of input. If `self.get_tag("capability:multivariate")`` is False, + types of input. If ``self.get_tag("capability:multivariate")`` is False, they cannot handle multivariate series. If ``self.get_tag( "capability:unequal_length")`` is False, they cannot handle unequal length input. In both situations, a ``ValueError`` is raised if X has a characteristic that the estimator does not have the capability to handle. - Data to fit transform to, of valid collection type. y : np.ndarray, default=None 1D np.array of float or str, of shape ``(n_cases)`` - class labels (ground truth) for fitting indices corresponding to instance indices in X. @@ -117,20 +116,20 @@ def transform(self, X, y=None): Parameters ---------- X : np.ndarray or list - Input data, any number of channels, equal length series of shape ``( - n_cases, n_channels, n_timepoints)`` - or list of numpy arrays (any number of channels, unequal length series) - of shape ``[n_cases]``, 2D np.array ``(n_channels, n_timepoints_i)``, - where ``n_timepoints_i`` is length of series ``i``. Other types are - allowed and converted into one of the above. + Data to fit transform to, of valid collection type. Input data, + any number of channels, equal length series of shape ``( + n_cases, n_channels, n_timepoints)`` or list of numpy arrays (any number + of channels, unequal length series) of shape ``[n_cases]``, 2D np.array + ``(n_channels, n_timepoints_i)``, where ``n_timepoints_i`` is length of + series ``i``. Other types are allowed and converted into one of the above. Different estimators have different capabilities to handle different - types of input. If `self.get_tag("capability:multivariate")`` is False, + types of input. If ``self.get_tag("capability:multivariate")`` is False, they cannot handle multivariate series. If ``self.get_tag( "capability:unequal_length")`` is False, they cannot handle unequal length input. In both situations, a ``ValueError`` is raised if X has a characteristic that the estimator does not have the capability to handle. - Data to fit transform to, of valid collection type. + y : np.ndarray, default=None 1D np.array of float or str, of shape ``(n_cases)`` - class labels (ground truth) for fitting indices corresponding to instance indices in X. @@ -171,20 +170,19 @@ def fit_transform(self, X, y=None): Parameters ---------- X : np.ndarray or list - Input data, any number of channels, equal length series of shape ``( - n_cases, n_channels, n_timepoints)`` - or list of numpy arrays (any number of channels, unequal length series) - of shape ``[n_cases]``, 2D np.array ``(n_channels, n_timepoints_i)``, - where ``n_timepoints_i`` is length of series ``i``. Other types are - allowed and converted into one of the above. + Data to fit transform to, of valid collection type. Input data, + any number of channels, equal length series of shape ``(n_cases, + n_channels, n_timepoints)`` or list of numpy arrays (any number of + channels, unequal length series) of shape ``[n_cases]``, 2D np.array ``( + n_channels, n_timepoints_i)``, where ``n_timepoints_i`` is length of + series ``i``. Other types are allowed and converted into one of the above. Different estimators have different capabilities to handle different - types of input. If `self.get_tag("capability:multivariate")`` is False, + types of input. If ``self.get_tag("capability:multivariate")`` is False, they cannot handle multivariate series. If ``self.get_tag( "capability:unequal_length")`` is False, they cannot handle unequal length input. In both situations, a ``ValueError`` is raised if X has a characteristic that the estimator does not have the capability to handle. - Data to fit transform to, of valid collection type. y : np.ndarray, default=None 1D np.array of float or str, of shape ``(n_cases)`` - class labels (ground truth) for fitting indices corresponding to instance indices in X. @@ -222,20 +220,19 @@ def inverse_transform(self, X, y=None): Parameters ---------- X : np.ndarray or list - Input data, any number of channels, equal length series of shape ``( - n_cases, n_channels, n_timepoints)`` - or list of numpy arrays (any number of channels, unequal length series) - of shape ``[n_cases]``, 2D np.array ``(n_channels, n_timepoints_i)``, - where ``n_timepoints_i`` is length of series ``i``. Other types are - allowed and converted into one of the above. + Data to fit transform to, of valid collection type. Input data, + any number of channels, equal length series of shape ``( + n_cases, n_channels, n_timepoints)`` or list of numpy arrays (any number + of channels, unequal length series) of shape ``[n_cases]``, 2D np.array + ``(n_channels, n_timepoints_i)``, where ``n_timepoints_i`` is length of + series ``i``. Other types are allowed and converted into one of the above. Different estimators have different capabilities to handle different - types of input. If `self.get_tag("capability:multivariate")`` is False, + types of input. If ``self.get_tag("capability:multivariate")`` is False, they cannot handle multivariate series. If ``self.get_tag( "capability:unequal_length")`` is False, they cannot handle unequal length input. In both situations, a ``ValueError`` is raised if X has a characteristic that the estimator does not have the capability to handle. - Data to fit transform to, of valid collection type. y : np.ndarray, default=None 1D np.array of float or str, of shape ``(n_cases)`` - class labels (ground truth) for fitting indices corresponding to instance indices in X. diff --git a/pyproject.toml b/pyproject.toml index fd1eea15a7..0ccbd341d9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,9 +58,11 @@ dependencies = [ [project.optional-dependencies] # soft dependencies all_extras = [ - "esig>=0.9.7; platform_system != 'Darwin' and python_version < '3.11'", + # Upper bound set as <1.0.0 as 1.0 dropped support for python 3.9. We will remove + # the upper bound once we also drop support for python 3.9 later in 2025. + "esig>=0.9.7,<1.0.0; platform_system != 'Darwin' and python_version < '3.11'", "imbalanced-learn", - "matplotlib>=3.3.2", + "matplotlib>=3.3.2", # Remove upper bound "pycatch22>=0.4.5", "pyod>=1.1.3", "prts>=1.0.0.0",