Skip to content

Commit

Permalink
Merge branch 'main' into ajb/code_cov
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyBagnall authored Dec 20, 2024
2 parents 37eb58b + 39fe7b4 commit 5240c09
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
24 changes: 14 additions & 10 deletions aeon/classification/deep_learning/_lite_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------
Expand Down Expand Up @@ -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
----------
Expand Down
4 changes: 2 additions & 2 deletions aeon/regression/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
61 changes: 29 additions & 32 deletions aeon/transformations/collection/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 5240c09

Please sign in to comment.