2 ms·
Would be interested in seeing that implementation, remember the URL by any chance?
by Tichy 17y ago
Would be interested in seeing that implementation, remember the URL by any chance?
- jacquesm 17y agoThe K-means clustering one ? let me have a look, I think I downloaded the code. edit: I can't find it in a couple of minutes, I was interested in it because one of the companies I'm involved in needed a way to classify items without any prior knowledge of the number of groups so I read up on that. The most interesting feature of that particular implementation was how they chose their initial 'seeds', that is a big factor in how long it takes for the algorithm to converge on a solution. I'll keep looking for it, I'm fairly sure I have at least a bunch of references to it in an email and a copy of some papers on my harddrive somewhere. Note to self: get organized better.
- physcab 17y agoK-means is a fairly easy algorithm to implement. You just split your data depending on how many clusters you want, calculate the distance of every point to each cluster, assign, re-split, re-calculate, re-assign until some convergence criteria is met. There are a variety of implementations that speed this process up. One is canopy clustering which allows you specify which clusters the points will check with (ie checking with all the clusters takes a while, but canopies can limit the search). You can also try different distance metrics such as the triangle inequality. There should be lots of implementations online, specifically for Matlab which you can port over to another language if you wanted. It's one of the most widely used and most useful clustering algorithms and often provides initialization for lots of other algorithms such as Expectation Maximization (EM). This link comes to mind: http://cseweb.ucsd.edu/~elkan/fastkmeans.html http://cseweb.ucsd.edu/~elkan/fastkmeans.html
- Tichy 17y agoThanks! If you can't find it, don't worry, though. It's just that I recently implemented one myself and struggled a bit to make it elegant.