Huum, for a while I write a note to define Single Linkage Clustering Algorithm..
Well, I’m afraid I forget it or lose my note, so I’d like to write it here..
From data scratch, I need to redefine it into distance matrix..
//distance matrix
for i=1 to row
for j = i+1 to row
Mat[i,j] = Euclid(Data[i], Data[j])
end
end
//finish
then I need to find the minimum for each data point, and restore it into temporary variable
//run single linkage clustering
while 1
min = 0
for i = 1 to row
for j = i+1 to row
if min > Mat[i,j] and Mat[i,j] >= 0 then
min = Mat[i,j]
Dtx = i; Dty = j //store the row column that has minimum distance
end
end
end
MatH[Dtx, Dty] = min;
Mat[Dtx, Dty] = -1;
//it means, condition never meet the minimum value, because all value has already -1
if mean = 0 then
break
end
//finish
Hope it will run well

March 6, 2009 at 5:17 pm |
hey this is totally wrong!…………….
March 6, 2009 at 5:18 pm |
dont trust on this logic…
March 7, 2009 at 12:53 am |
hello ankit,
sorry I didn’t update it.
actually this one is wrong
when I wrote it, it was only my first idea, and then really needs more revise. It better I superscript it until I have a time to revise it
March 7, 2009 at 11:42 pm |
sounds good!…