File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -91,3 +91,10 @@ show .ut.plt s:(avg raze .ml.silhouette[.ml.edist;X]::) peach I
91
91
ks i : .ml.imax s
92
92
-1 "superimpose the centroids on the data" ;
93
93
show .ut.plot [39 ;20 ;.ut.c10 ;avg ] .ml.append [0N ;X],' .ml.append [1 ] C i
94
+
95
+ -1 "a soft version of Lloyds algorithm is available with .ml.lloyds" ;
96
+ -1 ".ml.kmeanss and .ml.kmeanssmax should be identical to ml.kmeans" ;
97
+ X : iris .X
98
+ C : asc flip .ml.kmeans [X] over C0 : last 3 .ml.kmeanspp [X]// 2 # ()
99
+ .ut.assert [C] asc flip .ml.kmeanss [X] over C0
100
+ .ut.assert [C] asc flip .ml.kmeanssmax [500 ;X] over C0
Original file line number Diff line number Diff line change @@ -310,7 +310,7 @@ skmeans:lloyd[cosdist;normalize (avg'')::] / spherical k-means
310
310
kmeanss : lloyds [edist2 ;wavg \:/: ;ismin ] / k-means using Lloyd with rf
311
311
/ v1 David Mackay using stiffness parameter (b)eta. 1%sqrt b represents the
312
312
/ sigma (or radius) of the cluster
313
- kmeanssmax : {[b ;X ]lloyds [edist2 ;wavg \:/: ;softmax neg [b]*;X]}
313
+ kmeanssmax : {[b ;X ]lloyds [edist2 ;wavg \:/: ;ssoftmax neg [b]*;X]}
314
314
315
315
/ using (d)istance (f)unction, find the medoid in matri(X)
316
316
medoid : {[df ;X ]X@\: imin f2nd [sum df [X]:: ] X}
You can’t perform that action at this time.
0 commit comments