aeon-toolkit / aeon

A toolkit for machine learning from time series
https://aeon-toolkit.org/
BSD 3-Clause "New" or "Revised" License
963 stars 112 forks source link

[MNT] Wrong type annotations for aeon classes #1928

Open CodeLionX opened 1 month ago

CodeLionX commented 1 month ago

Describe the issue

We started to add Python type hints to our estimators. However, some existing hints for (Aeon) classes are incorrect, e.g.

https://github.com/aeon-toolkit/aeon/blob/be4af658d47526dad272e84a7d667b0a151383dd/aeon/classification/sklearn/_rotation_forest_classifier.py#L108-L110

Suggest a potential alternative/fix

Because the RotationForestClassifier works with an instance as base_estimator the correct type would be base_estimator: BaseEstimator

We need to check the code base for further such issues.

Additional context

No response

CodeLionX commented 1 month ago