m8ta
You are not authenticated, login. |
|
{224} |
ref: notes-0
tags: k-means clustering neurophysiology sorting
date: 01-03-2012 06:51 gmt
revision:1
[0] [head]
|
|
k-means is easy! % i want to do the k-means alg. v = [x y]; nc = 7; dim = cols(v); n = rows(v); cent = rand(nc,dim); d = zeros(n, nc); for k = (1:500) for s = 1:nc d(:,s) = sqrt(sum((v - rvecrep(cent(s, :), n)).^2,2)); end % select the smallest [nada, g] = min(d'); g = g'; for s = 1:nc if(numel(find(g==s)) > 0) cent(s, :) = mean(v(g==s, :)); end end end real data from clementine: | ||
{65} | ||
follow up paper: http://spikelab.jbpierce.org/Publications/LaubachEMBS2003.pdf
____References____ Laubach, M. and Arieh, Y. and Luczak, A. and Oh, J. and Xu, Y. Bioengineering Conference, 2003 IEEE 29th Annual, Proceedings of 17 - 18 (2003.03) |