Open SebastianSchmidl opened 3 months ago
check_random_state()
also requires an instance of RandomState
and not a class,
e.g. https://github.com/aeon-toolkit/aeon/blob/be4af658d47526dad272e84a7d667b0a151383dd/aeon/classification/distance_based/_proximity_forest.py#L92 (and other locations)i would like to work on this issue
Sure!
@aeon-actions-bot assign @aryan0931
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
Type[BaseEstimator]
references the type of the class (thus,estimatorFactory = BaseEstimator
is of typeType[BaseEstimator]
)BaseEstimator
references an instance of this class (thus,estimator = BaseEstimator()
is of typeBaseEstimator
)Suggest a potential alternative/fix
Because the
RotationForestClassifier
works with an instance asbase_estimator
the correct type would bebase_estimator: BaseEstimator
We need to check the code base for further such issues.
Additional context
No response