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

Pb with kmean if dim=1 #41

Open
Conchylicultor opened this issue Oct 7, 2016 · 0 comments
Open

Pb with kmean if dim=1 #41

Conchylicultor opened this issue Oct 7, 2016 · 0 comments

Comments

@Conchylicultor
Copy link

According to this line, https://github.com/koraykv/unsup/blob/master/kmeans.lua#L39L42 because we divide each centroids by its norm, in the case of a number of dimension equal to 1, the centroids will all be initialized to the same value: 1 (or -1).
In my case, that gave strange results where only 2 of the 8 centroids where used in the final results. Initializing the centroid to random points of the given data x worked much better in my case.

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

1 participant