Professional Documents
Culture Documents
08775514 29.18597699 23.97963023 21.50522263 23.55428478 13.43293446 18.79599014 18.60548463] [r c]=size(aa); for i=1:10 opts = statset('Display','final'); s=0; [cidx, ctrs, sumd] = kmeans(aa, i, 'Distance','cosine','Start','uniform' ,'Replicates',5, 'EmptyAction', 'singleton','Options',opts) for j=1:i s=s+sumd(j,1); end result=s/r end -----------------------------------------------------------------------------------------------------------------------------------------------------------------Results: aa = 44.4012 36.6519 23.6185 21.1476 31.0033 34.4523 31.2176 8.3837 21.7746 21.2670 13.5705 23.6326 16.0878 29.1860 23.9796 21.5052
23.5543 13.4329 18.7960 18.6055 2 2 2 2 2 iterations, iterations, iterations, iterations, iterations, total total total total total sum sum sum sum sum of of of of of distances distances distances distances distances = = = = = 0 0 0 0 0
cidx = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 sumd = 0 result = 0 Warning: Empty cluster created at iteration 1 during replicate 1. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 2. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 3. > In kmeans>batchUpdate at 444 In kmeans at 336
2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 4. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 5. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 sumd = 0 0 result = 0 Warning: Empty cluster created at iteration 1 during replicate 1. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 2. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 3. > In kmeans>batchUpdate at 444
In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 4. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 5. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 sumd = 0 0 0 result = 0 Warning: Empty cluster created at iteration 1 during replicate 1. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 2. > In kmeans>batchUpdate at 444 In kmeans at 336
2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 3. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 4. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 5. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 1 sumd = 0 0 0 0 result = 0 Warning: Empty cluster created at iteration 1 during replicate 1. > In kmeans>batchUpdate at 444
In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 1 1 sumd = 0 0 0 0 0
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 1 1 1 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
sumd = 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 8 1 1 1 1 1 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
1 1 1 1 1 1 1 1 ctrs = 1 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration 1 during replicate 1. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 2. > In kmeans>batchUpdate at 444 In kmeans at 336
2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 3. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 4. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 5. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 8 9 10 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0
0 0 0 0 result = 0 ................................................................................ ................................................................................ Green( PCA) --------------aa=[52.91163278 47.38054246 38.0711672 36.66285877 49.48520492 46.89475967 53.00367698 33.75061285 38.51008979 38.55353779 37.73360008 50.66841678 41.51728224 53.95340169 49.24814383 50.95964209 55.17029329 47.44258726 49.90120015 54.7834738] [r c]=size(aa); for i=1:10 opts = statset('Display','final'); s=0; [cidx, ctrs, sumd] = kmeans(aa, i, 'Distance','cosine','Start','uniform' ,'Replicates',5, 'EmptyAction', 'singleton','Options',opts) for j=1:i s=s+sumd(j,1); end result=s/r end --------------------------------------------------------------------------------------------------------------------------------------------------------------Results: aa = 52.9116 47.3805 38.0712 36.6629
49.4852 46.8948 53.0037 33.7506 38.5101 38.5535 37.7336 50.6684 41.5173 53.9534 49.2481 50.9596 55.1703 47.4426 49.9012 54.7835 2 2 2 2 2 iterations, iterations, iterations, iterations, iterations, total total total total total sum sum sum sum sum of of of of of distances distances distances distances distances = = = = = 0 0 0 0 0
Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 sumd = 0 0 result =
1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 sumd = 0 0 0 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 1 sumd = 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
1 1 sumd = 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
ctrs = 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 1 1 1 1 1 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
2 3 4 5 6 7 8 1 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration 1 during replicate 1. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 2. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 3. > In kmeans>batchUpdate at 444
In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 4. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 5. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 0 0
result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 8 9 10 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 1 1 1 1 1 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
1 1 sumd = 0 0 0 0 0 0 0 0 0 0 result = 0 ................................................................................ ................................................................................ ...... Low(FA) ------------aa=[27.15542738 25.15981701 9.51963112 9.86673845 22.44806128 13.8678792 17.72884079 24.4388654 32.95080236 26.30541936 26.86120401 24.71053215 26.58260996 16.56932162 16.1126957] [r c]=size(aa); for i=1:10 opts = statset('Display','final'); s=0; [cidx, ctrs, sumd] = kmeans(aa, i, 'Distance','cosine','Start','uniform' ,'Replicates',5, 'EmptyAction', 'singleton','Options',opts) for j=1:i s=s+sumd(j,1); end result=s/r end --------------------------------------------------------------------------------------------------------------------------------------------------------------Results:
aa = 27.1554 25.1598 9.5196 9.8667 22.4481 13.8679 17.7288 24.4389 32.9508 26.3054 26.8612 24.7105 26.5826 16.5693 16.1127 2 2 2 2 2 iterations, iterations, iterations, iterations, iterations, total total total total total sum sum sum sum sum of of of of of distances distances distances distances distances = = = = = 0 0 0 0 0
cidx = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 sumd = 0 result = 0 Warning: Empty cluster created at iteration 1 during replicate 1. > In kmeans>batchUpdate at 444
In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 sumd = 0 0 result = 0
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
Warning: Empty cluster created at iteration 1 during replicate 1. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 2. > In kmeans>batchUpdate at 444
In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 3. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 4. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 5. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 1 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 sumd = 0 0 0 result = 0 Warning: Empty cluster created at iteration 1 during replicate 1. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 2. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0
Warning: Empty cluster created at iteration 1 during replicate 3. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 4. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 5. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 1 sumd = 0 0 0 0 result = 0 Warning: Empty cluster created at iteration 1 during replicate 1. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 2. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0
Warning: Empty cluster created at iteration 1 during replicate 3. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 4. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 5. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 1 1 sumd = 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration 1 during replicate 1. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 2. > In kmeans>batchUpdate at 444
In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 3. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 4. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 5. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration 1 during replicate 1. > In kmeans>batchUpdate at 444
In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 8 1 1 1 1 1 1 1 1 ctrs = 1 1 1 1 1 1 1 1 sumd = 0 0 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 ctrs = 1 1 1 1 1 1 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
1 1 1 sumd = 0 0 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 8 9 10 1 1 1 1 1 1 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
ctrs = 1 1 1 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 0 0 0 result = 0 ................................................................................ ................................................................................ .... Low(PCA) -------------aa=[-4.314183546 -1.702331806 15.96665832 21.27857523 7.647095815 20.9440981 18.63927569 15.21967882 11.32996605 14.47392831 21.39441156 24.72420362 28.83019416 32.84694274 33.1610163] [r c]=size(aa); for i=1:10 opts = statset('Display','final'); s=0;
[cidx, ctrs, sumd] = kmeans(aa, i, 'Distance','cosine','Start','uniform' ,'Replicates',5, 'EmptyAction', 'singleton','Options',opts) for j=1:i s=s+sumd(j,1); end result=s/r end ----------------------------------------------------------------------------------------------------------------------------------------------------------------Results: aa = -4.3142 -1.7023 15.9667 21.2786 7.6471 20.9441 18.6393 15.2197 11.3300 14.4739 21.3944 24.7242 28.8302 32.8469 33.1610 2 2 2 2 2 iterations, iterations, iterations, iterations, iterations, total total total total total sum sum sum sum sum of of of of of distances distances distances distances distances = = = = = 4 4 4 4 4
sumd = 4 result = 0.2667 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 2. > In kmeans>batchUpdate at 444 In kmeans at 336 3 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 3. > In kmeans>batchUpdate at 444 In kmeans at 336 3 iterations, total sum of distances = 0 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 5. > In kmeans>batchUpdate at 444 In kmeans at 336 3 iterations, total sum of distances = 0 cidx = 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 ctrs = -1 1 sumd = 0 0 result = 0
Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 1 3 3 3 3 3 3 3 3 3 3 3 3 3 ctrs = -1 -1 1 sumd = 0 0 0 result = 0
1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
> In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 3 1 4 2 2 2 2 2 2 2 2 2 2 2 2 ctrs = -1 1 -1 1 sumd = 0 0 0 0 result = 0
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
> In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 1 3 4 5 5 5 5 5 5 5 5 5 5 5 ctrs = -1 -1 1 1 1 sumd = 0 0 0 0 0 result = 0
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 1 1 1 1 1 1 1 1 1 1 ctrs = 1 -1 -1 1 1 1 sumd = 0 0 0 0 0 0
1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 6 3 4 5 7 1 1 1 1 1 1 1 1 1 ctrs = 1 -1 1 1 1 -1 1 sumd = 0 0 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 8 1 1 1 1 1 1 1 1 ctrs = 1 -1 -1 1 1 1 1 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
1 sumd = 0 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 ctrs = 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
1 -1 -1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 3 1 4 5 6 7 8 9 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
10 2 2 2 2 2 2 ctrs = -1 1 -1 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 0 0 0 result = 0 ................................................................................ ................................................................................ ... Medium(FA) -------------aa=[7.728856648 9.122404584 7.346334881 9.854287494 9.467605591 9.061449636 11.23959652 14.37303287 15.38942106 17.45195117 18.13627777
18.09848309 20.2552805 21.42929794 27.47502423] [r c]=size(aa); for i=1:10 opts = statset('Display','final'); s=0; [cidx, ctrs, sumd] = kmeans(aa, i, 'Distance','cosine','Start','uniform' ,'Replicates',5, 'EmptyAction', 'singleton','Options',opts) for j=1:i s=s+sumd(j,1); end result=s/r end -----------------------------------------------------------------------------------------------------------------------------------------------------------------Results: aa = 7.7289 9.1224 7.3463 9.8543 9.4676 9.0614 11.2396 14.3730 15.3894 17.4520 18.1363 18.0985 20.2553 21.4293 27.4750 2 2 2 2 2 iterations, iterations, iterations, iterations, iterations, total total total total total sum sum sum sum sum of of of of of distances distances distances distances distances = = = = = 0 0 0 0 0
cidx = 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 ctrs = 1 sumd = 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
1 1 sumd = 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 1 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
sumd = 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 1 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
sumd = 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 1 1 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
sumd = 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 1 1 1 1 1 1 1 1 1 1 ctrs = 1 1 1 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
1 1 1 sumd = 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 1 1 1 1 1 1 1 1 1 ctrs = 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 8 1 1 1 1 1 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
1 1 1 ctrs = 1 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
6 7 8 9 1 1 1 1 1 1 1 ctrs = 1 1 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
> In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 8 9 10 1 1 1 1 1 1 ctrs = 1 1 1 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 0 0 0 result = 0 ................................................................................ ................................................................................ .... M edium(PCA)
---------------aa=[-1.728842053 -0.749104488 6.316183116 5.462623468 7.328155198 10.95107429 12.54893718 15.49685624 15.79313358 17.49045009 21.90393953 22.63127316 26.77535754 26.27239564 30.50369233] [r c]=size(aa); for i=1:10 opts = statset('Display','final'); s=0; [cidx, ctrs, sumd] = kmeans(aa, i, 'Distance','cosine','Start','uniform' ,'Replicates',5, 'EmptyAction', 'singleton','Options',opts) for j=1:i s=s+sumd(j,1); end result=s/r end ------------------------------------------------------------------------------------------------------------------------------------------------------------------Results: aa = -1.7288 -0.7491 6.3162 5.4626 7.3282 10.9511 12.5489 15.4969 15.7931 17.4905 21.9039 22.6313 26.7754 26.2724 30.5037 2 2 2 2 2 iterations, iterations, iterations, iterations, iterations, total total total total total sum sum sum sum sum of of of of of distances distances distances distances distances = = = = = 4 4 4 4 4
cidx =
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 0.7333 sumd = 4 result = 0.2667 Warning: Empty cluster created at iteration 1 during replicate 1. > In kmeans>batchUpdate at 444 In kmeans at 336 3 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 2. > In kmeans>batchUpdate at 444 In kmeans at 336 3 iterations, total sum of distances = 0 2 iterations, total sum of distances = 0 2 iterations, total sum of distances = 0 2 iterations, total sum of distances = 0 cidx = 2 2 1 1 1 1 1 1 1 1 1 1 1 1
1 ctrs = 1 -1 sumd = 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 1 1 1 1 1 1 1 1 1 1 1 1 1 ctrs = 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
1 -1 -1 sumd = 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 3 1 4 2 2 2 2 2 2 2 2 2 2 2 2 ctrs = -1 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
1 -1 1 sumd = 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 1 4 5 3 3 3 3 3 3 3 3 3 3 3 ctrs = -1 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
-1 1 1 1 sumd = 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 4 3 5 6 1 1 1 1 1 1 1 1 1 1 ctrs = 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
1 -1 1 -1 1 1 sumd = 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 7 3 4 5 6 1 1 1 1 1 1 1 1 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
1 ctrs = 1 -1 1 1 1 1 -1 sumd = 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 3 1 4 5 6 7 8 2 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
2 2 2 2 2 2 2 ctrs = -1 1 -1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 ctrs = 1 -1 -1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
> In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 5. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 3 2 4 5 6 7 8 9 10 1 1 1 1 1 1 ctrs = 1 -1 -1 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 0 0 0 result = 0 ................................................................................ ................................................................................
... Heavy(FA) -----------aa=[0.827646006 2.114811379 1.891292735 2.729351345 2.969584116 3.669276205 4.386391052 4.061107673 4.446817685 4.973500661]; [r c]=size(aa); for i=1:10 opts = statset('Display','final'); s=0; [cidx, ctrs, sumd] = kmeans(aa, i, 'Distance','cosine','Start','uniform' ,'Replicates',5, 'EmptyAction', 'singleton','Options',opts) for j=1:i s=s+sumd(j,1); end result=s/r end -------------------------------------------------------------------------------------------------------------------------------------------------------------------Results: 2 2 2 2 2 iterations, iterations, iterations, iterations, iterations, total total total total total sum sum sum sum sum of of of of of distances distances distances distances distances = = = = = 0 0 0 0 0
0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 1 1 1 1 1 1 1 1 1 ctrs = 1 1 sumd = 0 0 result = 0 Warning: Empty cluster created at iteration 1 during replicate 1. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 2. > In kmeans>batchUpdate at 444 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 3. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 4. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 5. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 1 1 1 1 1 1 1 1 ctrs = 1 1 1 sumd = 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
> In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 5. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 1 1 1 1 1 1 1 ctrs = 1 1 1 1 sumd = 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 1 1 1 1 1 1 ctrs = 1 1 1 1 1 sumd = 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
cidx = 2 3 4 5 6 1 1 1 1 1 ctrs = 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
2 3 4 5 6 7 1 1 1 1 ctrs = 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
cidx = 2 3 4 5 6 7 8 1 1 1 ctrs = 1 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 8 9 1 1 ctrs = 1 1 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
> In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 5. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 8 9 10 1 ctrs = 1 1 1 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 0 0 0 result = 0 ................................................................................ ................................................................................ ...... Heavy(PCA) ------------
aa=[0.827646006 2.114811379 1.891292735 2.729351345 2.969584116 3.669276205 4.386391052 4.061107673 4.446817685 4.973500661]; [r c]=size(aa); for i=1:10 opts = statset('Display','final'); s=0; [cidx, ctrs, sumd] = kmeans(aa, i, 'Distance','cosine','Start','uniform' ,'Replicates',5, 'EmptyAction', 'singleton','Options',opts) for j=1:i s=s+sumd(j,1); end result=s/r end -----------------------------------------------------------------------------------------------------------------------------------------------------------------Results: 2 2 2 2 2 iterations, iterations, iterations, iterations, iterations, total total total total total sum sum sum sum sum of of of of of distances distances distances distances distances = = = = = 0 0 0 0 0
0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 1 1 1 1 1 1 1 1 1 ctrs = 1 1 sumd = 0 0 result = 0 Warning: Empty cluster created at iteration 1 during replicate 1. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 2. > In kmeans>batchUpdate at 444 In kmeans at 336 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 3. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 4. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 5. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 1 1 1 1 1 1 1 1 ctrs = 1 1 1 sumd = 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 5. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 1 1 1 1 1 1 1 ctrs = 1 1 1 1 sumd = 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
2 iterations, total sum of distances = 0 cidx = 2 3 4 5 1 1 1 1 1 1 ctrs = 1 1 1 1 1 sumd = 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
2 3 4 5 6 1 1 1 1 1 ctrs = 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
2 3 4 5 6 7 1 1 1 1 ctrs = 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
2 3 4 5 6 7 8 1 1 1 ctrs = 1 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 8 9 1 1 ctrs = 1 1 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 5. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 8 9 10 1 ctrs = 1 1 1 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 0 0 0 result = 0 >> aa=[2.1645942 6.6498526 2.45464545 4.90499844 2.9246547 4.10811345 5.52753043
3.29135386 3.69755774 4.10617723]; [r c]=size(aa); for i=1:10 opts = statset('Display','final'); s=0; [cidx, ctrs, sumd] = kmeans(aa, i, 'Distance','cosine','Start','uniform' ,'Replicates',5, 'EmptyAction', 'singleton','Options',opts) for j=1:i s=s+sumd(j,1); end result=s/r end 2 iterations, total sum of distances = 0 2 iterations, total sum of distances = 0 2 iterations, total sum of distances = 0 2 iterations, total sum of distances = 0 2 iterations, total sum of distances = 0 cidx = 1 1 1 1 1 1 1 1 1 1 ctrs = 1 sumd = 0 result = 0 Warning: Empty cluster created at iteration 1 during replicate 1. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 2. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 3. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0
Warning: Empty cluster created at iteration 1 during replicate 4. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration 1 during replicate 5. > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 1 1 1 1 1 1 1 1 1 ctrs = 1 1 sumd = 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
cidx = 2 3 1 1 1 1 1 1 1 1 ctrs = 1 1 1 sumd = 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 1 1 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
1 1 1 1 1 ctrs = 1 1 1 1 sumd = 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 1 1 1 1 1 1 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
ctrs = 1 1 1 1 1 sumd = 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 1 1 1 1 1 ctrs = 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
1 1 1 1 1 1 sumd = 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 1 1 1 1 ctrs = 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 8 1 1 1 ctrs = 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
1 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 7 8 9 1 1 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.
ctrs = 1 1 1 1 1 1 1 1 1 sumd = 0 0 0 0 0 0 0 0 0 result = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 Warning: Empty cluster created at iteration > In kmeans>batchUpdate at 444 In kmeans at 336 2 iterations, total sum of distances = 0 cidx = 2 3 4 5 6 1 during replicate 1.
1 during replicate 2.
1 during replicate 3.
1 during replicate 4.
1 during replicate 5.