You could implement Lloyds algorithm in as little code, too.
One of the reasons that the sklearn implementation is much longer is that it doesn't do fancy indexing and avoids large intermediate arrays.


On 06/18/2015 10:09 AM, Kyle Kastner wrote:
I don't know if it is faster or better - but the learning rule is insanely simple and it is hard to believe there could be *anything* much faster. It is ten lines - won't copy it here cause the license is longer than the implementation!

Given the connection between PCA and K-means, this implementation (Matlab...) is also related http://homepages.cae.wisc.edu/~ece539/matlab/ghafun.m <http://homepages.cae.wisc.edu/%7Eece539/matlab/ghafun.m>

This points to this paper: http://courses.cs.washington.edu/courses/cse528/09sp/sanger_pca_nn.pdf

Basically this is the neural net approach to K-means. I have asked if there is a paper ref - though it might be "too easy" to have a real paper.


On Thu, Jun 18, 2015 at 9:58 AM, Andreas Mueller <t3k...@gmail.com <mailto:t3k...@gmail.com>> wrote:



    On 06/18/2015 09:48 AM, Kyle Kastner wrote:
    > This link should work http://www.cs.toronto.edu/~rfm/code.html
    <http://www.cs.toronto.edu/%7Erfm/code.html>
    > <http://www.cs.toronto.edu/%7Erfm/code.html>
    Is that faster / better than minibatch k-means? Is there a paper?

    
------------------------------------------------------------------------------
    _______________________________________________
    Scikit-learn-general mailing list
    Scikit-learn-general@lists.sourceforge.net
    <mailto:Scikit-learn-general@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/scikit-learn-general




------------------------------------------------------------------------------


_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

------------------------------------------------------------------------------
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to