-
Notifications
You must be signed in to change notification settings - Fork 234
[ENH] Cluster initialisation refactor #3122
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
base: main
Are you sure you want to change the base?
Conversation
Thank you for contributing to
|
TonyBagnall
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to tidy up the _initialisation file and a bit of the logic, but nice work
[ENH] Centralise clustering initialisation logic and refactor tests
Reference Issues/PRs
What does this implement/fix? Explain your changes.
This PR introduces a new file, _cluster_initialisation.py, which moves the initialisation logic out of the individual clusterers and into a centralised location. This refactoring makes the code easier to maintain and ensures consistency across different clustering algorithms.
In addition to centralising the logic, I have:
np.ndarrayof values instead of indexes), which is now handled seamlessly by the new resolve_center_initialiser function.Does your contribution introduce a new dependency? If yes, which one?
No.
Any other comments?
PR checklist
For all contributions
For new estimators and functions
__maintainer__at the top of relevant files and want to be contacted regarding its maintenance. Unmaintained files may be removed. This is for the full file, and you should not add yourself if you are just making minor changes or do not want to help maintain its contents.For developers with write access