aeon
aeon copied to clipboard
[ENH] Add n_channels check between fit and predict/transform
Describe the issue
We currently check if the data given during fit has the same number of channels as the data given during predict inside series estimator. While it would crash most estimators, some edge cases might exist where this wouldn't (e.g. smaller number of channels in fit and iterate on a self.n_channels_ set during fit).
Collection estimators have a similar function : https://github.com/aeon-toolkit/aeon/blob/main/aeon/base/_base_collection.py#L276 (check shape) which is not enforced in the base class currently, it might be a to do so.
Suggest a potential alternative/fix
Implement a check in the base classes to avoid the issue.
Additional context
No response