k-means should allow selecting points randomly as initialization #596

Closed
rcurtin opened this Issue Mar 26, 2016 · 1 comment

Projects

None yet

1 participant

@rcurtin
Member
rcurtin commented Mar 26, 2016

This also comes out of the discussion for #592. @kno10's suggestion is that we simply pick points randomly from the dataset as initial centroids.

This requires a bit of refactoring because the current initialization policy operates by setting the assignments of each point, instead of the location of each centroid. So there will need to be a little bit of thought on how exactly to handle this, but probably some template metaprogramming to handle both cases is in order here (so that a user can both write initialization policies that give initial point assignments and also initial centroids).

I will do this as I have time.

@rcurtin rcurtin self-assigned this Mar 26, 2016
@rcurtin rcurtin added this to the mlpack 2.0.2 milestone Mar 26, 2016
@rcurtin
Member
rcurtin commented Apr 12, 2016

This has been done in a38608b and the k-means program now defaults to this type of initialization. Thanks again @kno10 for pointing this out. :)

@rcurtin rcurtin closed this Apr 12, 2016
@rcurtin rcurtin added the R: fixed label Apr 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment