Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MNT] Wrong type annotations for aeon classes #1928

Closed
SebastianSchmidl opened this issue Aug 8, 2024 · 9 comments · Fixed by #2488
Closed

[MNT] Wrong type annotations for aeon classes #1928

SebastianSchmidl opened this issue Aug 8, 2024 · 9 comments · Fixed by #2488
Assignees
Labels
maintenance Continuous integration, unit testing & package distribution

Comments

@SebastianSchmidl
Copy link
Member

Describe the issue

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

remove_proportion: float = 0.5,
base_estimator: Optional[Type[BaseEstimator]] = None,
pca_solver: str = "auto",

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

@SebastianSchmidl SebastianSchmidl added good first issue Good for newcomers maintenance Continuous integration, unit testing & package distribution labels Aug 8, 2024
@SebastianSchmidl
Copy link
Member Author

SebastianSchmidl commented Aug 8, 2024

@aryan0931
Copy link

i would like to work on this issue

@SebastianSchmidl
Copy link
Member Author

Sure!

@aeon-actions-bot assign @aryan0931

@aeon-actions-bot aeon-actions-bot bot removed the good first issue Good for newcomers label Oct 27, 2024
@SebastianSchmidl
Copy link
Member Author

@aryan0931 Are you still working on this?

@aryan0931
Copy link

no

@MatthewMiddlehurst MatthewMiddlehurst added the good first issue Good for newcomers label Jan 9, 2025
@shinymack
Copy link
Contributor

I would like to work on this issue.
@aeon-actions-bot assign @shinymack

@aeon-actions-bot aeon-actions-bot bot removed the good first issue Good for newcomers label Jan 10, 2025
@shinymack
Copy link
Contributor

I was not able to find more of these incorrect type hints. The ones mentioned earlier are already fixed. Please let me know if there’s anything else you’d like me to check.

@SebastianSchmidl
Copy link
Member Author

I can confirm that the mentioned issues have been resolved. However, I could find the following additional locations (not as important because private methods, but we are already on it, so why not fix it):

def _find_splits_gain(self, node: type[_TreeNode], splits: list, gains: list):

def _predict_for_estimator(self, X, clf: int, pcas: type[PCA], groups):

def _predict_proba_for_estimator(self, X, clf: int, pcas: type[PCA], groups):

After those are fixed, we can close this IMO.

@SebastianSchmidl
Copy link
Member Author

@shinymack thank you for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Continuous integration, unit testing & package distribution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants