skmeans icon indicating copy to clipboard operation
skmeans copied to clipboard

Pass in a random value seed to cluster initialization functions

Open tessbianchi opened this issue 5 years ago • 3 comments

I'm using this library in a context where I need the results to be deterministic. Would it be possible to provide the option to pass a seed into the cluster initialization functions?

I was thinking an optional argument could be passed into the skmeans function called seed and that would be passed on to the kmpp and kmrand .

I am able to implement this functionality, I just want to make sure that this is behavior that library owners want.

Thanks!

tessbianchi avatar Jul 23 '20 15:07 tessbianchi

Actually looking a little more closely, I think we would have to allow a full random number generator into the skmeans function, not just the seed.

tessbianchi avatar Jul 23 '20 16:07 tessbianchi

Hi @tessbianchi If you want to implement it, go for it! Make a pull request and I'll merge it into the master branch 👍

solzimer avatar Jul 23 '20 16:07 solzimer

Woot! Thanks! I will get started!

tessbianchi avatar Jul 23 '20 16:07 tessbianchi