8000 You should be able to define initial centroids · Issue #11 · pharo-ai/k-means · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

You should be able to define initial centroids #11

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

Open
Croshiw opened this issue Feb 9, 2022 · 2 comments
Open

You should be able to define initial centroids #11

Croshiw opened this issue Feb 9, 2022 · 2 comments

Comments

@Croshiw
Copy link
Contributor
Croshiw commented Feb 9, 2022

When initializating kmeans, you should be able to choose if you want the initial centroids to be random or #6, or if you want to set your own initial centroids. Keep in mind that If an array is passed, it should be of shape (n_clusters, n_features) and gives the initial centers or else raise an exception.
https://scikit-learn.org/stable/modules/generated/sklearn.cluster.KMeans.html.

Adding this feature would be helpful in testing that empty clusters are relocated as expected if you give one initial centroid that is far from the data which means that a cluster will be empty on the first iteration

@jordanmontt
Copy link
Member

Fixed

@jordanmontt
Copy link
Member

Actually this is not fixed. It is still a valid issue. Now you have the posibility of defining the initial centroids. But when initializing the centroids if taking those centroids as the best one possibles of the moment. See AIKMeans>>#centroids:

The expected behavior of this issue is to initialize the initial centroids and then starting to run the algo from those centroids. Not to take those centroids as the best ones possible.

4DE4 @jordanmontt jordanmontt reopened this Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0