# akmeans: Adaptive K-means algorithm with threshold setting In akmeans: Adaptive Kmeans algorithm based on threshold

## Description

Adaptive K-means algorithm is quite simple ## 1. Set min.k and max.k. ## 2. Run K-means with K = min.k ## 3. For each cluster, check the threshold condition. ## 4. If all clusters satisfy the threshold condition => Done, return the result ## 5. Check K>max.k => If yes, stop. If no, go to step 5. ## 6. For any cluster violating the threshold condition, run K'-means with K'=2 on those cluster members, ## which means K will increase by the number of violating clusters. ## 7. Run K-means setting the present cluster centers as the initial centers and go to step 4.

## Usage

 ```1 2``` ```akmeans(x, ths1 = 0.2, ths2 = 0.2, ths3 = 0.7, ths4 = 0.2, min.k = 5, max.k = 100, iter.max = 100, nstart = 1, mode = 1, d.metric = 1, verbose = TRUE) ```

## Arguments

 `x` data matrix n by p: all elements should be numeric `ths1` threshold to decide whether to increase k or not: check sum((sample-assigned center)^2) < ths1*sum(assigned center^2) `ths2` threshold to decide whether to increase k or not: check all components of |sample-assigned center| < ths2 `ths3` threshold to decide whether to increase k or not: check inner product of (sample,assigned center) > ths3 , this is only for cosine distance metric `ths4` threshold to decide whether to increase k or not: check all components of sum(abs(sample-assigned center)) < ths4 `min.k` minimum number of clusters, starting k `max.k` maximum number of clusters `iter.max` will be delivered to kmeans function `nstart` will be delivered to kmeans function `mode` 1: use ths1, 2: use ths2, 3: use ths3 `d.metric` 1: use euclidean distance metric, otherwise use cosine distance metric `verbose` print the messages or not

## Details

## ths1: threshold to decide whether to increase k or not: check sum((sample-assigned center)^2) < ths1*sum(assigned center^2) ## ths2: threshold to decide whether to increase k or not: check all components of |sample-assigned center| < ths2 ## ths3: threshold to decide whether to increase k or not: check inner product of (sample,assigned center) > ths3 , this is only for cosine distance metric ## ths4: threshold to decide whether to increase k or not: check all components of sum(abs(sample-assigned center)) < ths4

## Value

if d.metric=1, it will return the same result as 'kmeans' function. if d.metric is not 1, a list will be returned with components : cluster: A vector of integers indicating the cluster to which each point is allocated. centers: A matrix of cluster centres size: The number of points in each cluster

Jungsuk Kwac

## Examples

 ```1 2 3 4``` ```x = matrix(rnorm(1000),100,10) akmeans(x) ## euclidean distance based akmeans(x,d.metric=2,ths3=0.8,mode=3) ## cosine distance based ```

### Example output

```[1] "# of clusters violating given threshold condition:  5"
[1] "now.k= 10"
[1] "# of clusters violating given threshold condition:  10"
[1] "now.k= 20"
[1] "# of clusters violating given threshold condition:  19"
[1] "now.k= 39"
[1] "# of clusters violating given threshold condition:  20"
[1] "now.k= 59"
[1] "# of clusters violating given threshold condition:  16"
[1] "now.k= 75"
[1] "# of clusters violating given threshold condition:  7"
[1] "now.k= 82"
[1] "# of clusters violating given threshold condition:  3"
[1] "now.k= 85"
[1] "# of clusters violating given threshold condition:  1"
[1] "now.k= 86"
[1] "# of clusters violating given threshold condition:  1"
[1] "now.k= 87"
[1] "converged at k= 87"
K-means clustering with 87 clusters of sizes 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1

Cluster means:
[,1]        [,2]        [,3]        [,4]          [,5]        [,6]
1   0.629739792  0.36589974  1.57996004 -2.02073820  0.0984664204 -0.76765089
2  -0.671352658  2.55809290 -1.77504230  0.86142775 -0.4343547508  1.83934032
3   0.747755836 -1.13625165 -0.52706431 -1.04874800 -1.7736677278 -0.59452594
4   1.961111379 -0.67003834 -0.45904019 -1.78887901 -1.9937703519  1.71368168
5   0.336645886 -0.75710415  1.38778393  1.07379923  0.4473673638  0.82930415
6  -2.362511928  0.17794594  0.04512594 -0.77265134  1.2737717403  0.35752232
7  -1.207134069  0.63013681  0.03896736  1.12896682 -0.1317252769  1.19721155
8  -1.612399795  1.60551304 -0.09086370 -0.37724867  1.2721825950  0.03071175
9  -0.474178878  0.17265343  0.01227546 -1.35992522  0.3150954587  0.21187465
10 -1.406200506 -0.30008710  1.04515823  0.99319846  2.0205344747  1.41782039
11  2.100258900 -0.14027293 -0.58385375 -0.60954628 -1.2968543189  0.02252449
12 -0.027112013 -0.36854228 -2.73631321 -0.22671473  1.1731779152  0.55045182
13  0.908344875 -2.35680496  0.79087973  0.91577329  0.3004335419  1.20481781
14  1.197771189 -0.31951900 -0.26189235 -1.52996047 -1.5643308240 -1.00697978
15 -0.330179598 -0.56038391  0.82839401 -1.76576859 -1.2313114286  1.39227131
16 -1.951332664  1.51840656  2.40104492 -1.18740912 -1.2899158071  1.06494447
17  2.109754115  0.40611155  0.38312629 -0.67687243 -0.3793731944 -0.89828397
18 -0.344897264 -1.35652275 -0.18044035 -0.02481718 -3.8075261466 -1.33116735
19 -0.127807355 -0.50354747 -1.48159486 -0.33213043 -2.0389312187 -0.76402770
20 -0.603936237  0.15170504 -1.01652279  1.20712743 -0.8442806478  0.09442562
21  0.594698421  1.94185513  0.17210673  0.29299280 -1.6110152602  0.64846983
22 -0.208907435  0.97933345 -0.02597910  0.98973827 -1.1009933977  1.31016896
23  0.512523262  0.16978871  0.95456945  0.58259813  0.1849014629  0.21548054
24 -0.345648889 -1.38901783 -1.13785599 -1.42883135 -0.2340754357  0.65067646
25  0.536331731 -0.56361990  0.89268945 -1.51446238 -0.8658982973  1.16449716
26  0.267841382  0.52025053 -0.15437023  2.19199506  1.2463584293  0.73260197
27  0.406556294 -0.51090351 -0.49334328 -0.17507059  1.8397805904  1.50483745
28 -0.569346798  0.38890572  1.99640775 -0.50381773 -0.1759326196  0.51382415
29  0.112094239 -0.71302250 -1.33511410  2.52795859 -1.0290384408  0.59803297
30 -1.165698690 -0.87926528  0.16116018  1.54481586 -0.1522489742 -0.66278955
31 -1.987005520 -0.71276804  0.01394343 -0.47491530  0.3154845444  0.96952250
32 -2.700161937 -1.00377397  0.51302681 -1.56050905 -0.1072853506  0.05391833
33 -0.514884933  0.82813498  0.12872745  0.94682444  0.5802994603 -0.88252253
34  0.187722294 -0.39199138 -0.99712125  0.33964864 -0.2724758088 -0.91053260
35 -0.013745738 -0.43094419  2.48088936 -1.09996847 -0.7257519879  1.51291156
36 -0.984629182 -0.95708220  0.06507972 -0.92619307 -0.9665082203  0.31351148
37 -0.380976436 -2.05453757  0.59252398 -1.57756742 -2.0697861382  0.19263931
38  0.182749472 -0.06251542  0.04326362 -0.18091903  1.5024483526 -0.38972765
39  0.524444707 -0.31401252 -0.62070086  0.42113891  0.8793867157 -1.29474540
40 -0.607120594  0.54297635  0.08140212 -1.58482013 -0.1303157781 -0.37536799
41 -1.065478519  1.25697935  1.28528733  1.21141839 -0.0138570741 -0.17043587
42 -0.530979794 -0.91048907 -2.42285351  0.53318837  0.2074405754  2.74291589
43 -1.075004402 -0.29471841 -1.36154187 -0.36921358  0.0024022690  1.46850018
44  1.094795186  2.07827081  0.42313796  0.32363139 -0.6987928004  2.15087050
45  0.961900232  1.57295635 -0.22981046  0.53433934 -0.5442042719  0.53501264
46  0.474721521  0.64059957 -0.59160257 -0.75495092 -1.1940632820  0.96926910
47 -0.009534857  0.19076892  0.87870774  0.04167274 -0.3890606412  0.84277288
48  0.772947788  0.41581235  0.42754546  0.22815858 -1.4271292913  0.05328644
49  0.330898405  0.13230175 -0.02385420 -0.04769795 -0.2889230858 -1.35668428
50 -0.715549143 -0.95128459 -0.40575589 -0.35934347  1.7633891810 -1.00403354
51 -0.601403822 -0.13220221  0.20869159  0.11805054  0.0660258506 -0.53190419
52 -0.059784310 -0.82659833 -0.01677529  0.19541525 -0.0164843760  0.60362479
53 -0.092594457 -1.43069278  1.30589041  0.26725215 -0.5316780728  1.94075903
54 -0.396822257  0.69322974  0.32475427  1.34893534 -0.6269395118 -1.07769822
55  1.229792389  0.93152627 -0.40699608  1.30467435 -0.7089411249 -0.43454584
56 -0.911924012  0.80989320 -0.03137732  1.66896177 -0.0837751859 -0.14370543
57 -0.883167775  1.06327351  0.18391786  0.98461619  1.3204512159 -0.41425754
58  0.832501778 -0.74418878  1.48266046 -0.23367361  1.0964981503 -0.80146039
59  0.745156836 -1.57839257  2.05469320 -0.23095786 -0.2717866663 -0.35406377
60 -0.306922961  0.02928071  0.19761870 -2.73016359 -1.6456988719 -2.16279708
61 -0.782365045 -1.92675086  0.86085033  0.31295669  1.0227038117  0.46154656
62  0.687799205 -0.87061149  0.11791649 -0.27050059 -1.5533964279  0.54083709
63  0.372093253 -1.08235002 -0.12166611  0.73632646 -0.0362359526  1.12843586
64 -0.423246907 -0.18958978  0.55284777  0.46569765 -1.0210736588  1.52916869
65  0.202790665 -0.38974966  1.44219666  0.73769987 -0.1640586640 -0.45154466
66 -0.036843819 -0.57419904  1.16574021  0.99168758 -1.7611430136  0.39397267
67  0.933906322 -1.73346423  0.66598728 -0.33405521  0.2257359559  1.17013770
68 -0.369421655  0.08728623 -0.08947063 -0.28114607  0.9066323973  1.80274684
69  0.030075562 -1.20219135 -1.33447341 -0.40267958  0.6201230492 -1.03708914
70 -0.529404488 -0.06088495  1.26356670  0.49375902  0.8203762622  0.77292003
71 -1.500245205 -0.14270011  0.63288911 -0.45329805  0.8889438211  0.72394374
72 -0.321338152 -0.26195562 -1.57932522 -1.90768194 -0.7507223025 -1.16096561
73 -0.351961836  0.27020059 -0.18288462 -0.66736996 -1.3414020404 -0.53019605
74  0.173711082 -1.29288341  0.82798261  0.83677480 -0.2242789758 -0.42859096
75 -0.768916616 -0.93317071 -0.54699895  0.18069365 -0.2998959234 -0.98062845
76  0.590525914  0.82639280  1.50323486  0.41304024 -0.5375463647  0.72978514
77  1.845364533  0.60628454 -1.05637363  0.14730715 -0.0793137915 -0.19238785
78  1.546433975  0.06879734  0.37337703 -0.54575631  0.1885208109  0.66347961
79  1.625966137  0.26582484  0.83057159  0.25218056 -1.0729615397  1.36890167
80  0.258141067 -1.20528242 -0.19678895  0.57888429  0.0001572802 -0.11393245
81 -0.530904248 -0.82852996 -0.57424046  0.13021857  0.0705897472 -0.36303547
82 -0.108768018  1.62638259  1.05484197 -0.31066544 -0.4669824912  0.03875271
83  1.490959644  0.10191341  0.13283840  0.14513349 -0.1539289881 -0.35563763
84  0.992864820  0.09022250 -0.58535787 -0.40204694  0.5148241932  0.08439793
85  1.313553805  0.83399328  1.36241270  0.31648164 -0.8285988389 -0.21739793
86  0.964323429  0.70838847  0.72714891 -0.27093678 -0.6564867629 -0.46106098
87  0.338569606  1.04672203  0.31431938  0.04639730 -0.6806470362  0.69545377
[,7]        [,8]        [,9]       [,10]
1   0.136666273 -0.17391439 -1.25045631 -1.37243756
2   0.896315659  0.03589085 -0.96695990  0.96676976
3  -1.640645054  0.38811302 -1.40249245 -1.76160433
4  -0.239692772  0.26399324 -1.75215309 -1.16952912
5  -1.328751882 -0.72891351 -1.05090227  1.91446263
6   2.291048882  1.33918456  0.60198437 -1.08642027
7  -0.158491111  1.00588365  2.23179777  1.12782764
8  -1.395105563  0.10225438  0.57484981  0.37275720
9  -0.847161606  1.09953923 -0.02055157  1.58311286
10 -0.840085958 -0.22218879  0.67335693 -1.25319791
11  0.880085258 -0.79113531  2.03858108  0.48671717
12  2.065245523  1.60355260 -0.95266066  1.49233012
13  1.054724771  0.74954545  1.44522724  0.91001650
14  1.582620100 -0.38057072  0.80522079 -0.63114916
15  2.247144064 -1.26455850 -0.84057902 -0.03630811
16  0.760121164 -1.32313671 -0.76169177 -0.66458651
17  2.182407845  0.47329876 -1.63275489  0.97364293
18 -0.687138036  0.26298182 -0.67657036  0.62554107
19 -1.213679922  1.29538519 -0.26802580  0.02282279
20 -0.994696829 -1.38584472 -1.11869754 -0.12023196
21 -0.430434263  1.94244148  1.18488711  0.94560630
22  0.844793146 -0.33290041  1.10127058 -0.78781104
23 -1.917665919 -1.57879990 -0.99779118 -1.61072359
24  0.866473209  0.20307099  1.37057271 -0.10618131
25 -0.371270614  1.16635310  0.34041699 -0.47557884
26 -1.520409599  0.67215378 -0.49349201  2.33728402
27 -0.051542634  0.10001765 -0.34259750  1.85297510
28 -2.179682072  0.47451489  0.80236736 -0.72266460
29  0.965738060  2.20453739 -0.18376399  1.27228400
30  1.347471817  1.08666071 -0.94108269  0.28095416
31 -1.471355588  1.52600658  0.26709656 -1.22732248
32 -1.281871493 -0.37094110  0.32215509  0.37216971
33 -1.172888953 -1.31486340 -1.58263794  1.00501013
34  0.164182229 -2.03815379 -1.78159140 -1.06926657
35  0.681065576 -0.45081373  0.13178597  0.62244557
36  1.476138868  0.31998226 -0.50195632  0.99959262
37 -0.192208678  0.03507194 -0.53617672  0.69991367
38 -0.248489377 -0.14459860 -0.43699024 -1.48656551
39  0.752471661  0.49370648  1.49525136 -1.91365379
40 -0.380122664 -0.47127177  1.57849897 -0.85830745
41  1.738652826 -0.51923407  1.36362642  0.51589613
42  0.020098468  0.40261620  0.26189636  0.51192993
43  0.634456144  1.70982868 -0.28486029 -0.76234424
44 -1.578884382  0.44127724 -0.44086929 -0.46539736
45 -0.922739147  0.26273423 -1.42162862  0.54430456
46 -1.663323796 -1.88290965 -0.28253672  0.11858971
47 -0.476542765 -1.82450954 -1.46726901  0.60516090
48  0.890612493 -1.29974550  0.10449024  0.31960453
49  0.819752125 -1.94818710 -0.04782466  0.62235042
50  0.219067251 -0.66413749 -0.56312889  1.56211366
51  0.576063785 -0.80606346  0.34644592  1.72852627
52  0.270517395 -0.62406254 -1.41406685 -0.74689700
53  0.420833889  1.84350285 -0.23019736  0.91823150
54  0.660593957  1.26860915  1.52113791  0.52970312
55  0.764517556  1.21895553  1.03365589  0.33804976
56  0.237389594 -0.14450119 -1.11766340 -1.15381647
57  1.243229881 -0.13356853  0.25758963 -1.53291741
58 -0.166617343 -0.60172868 -1.04984333  1.00496667
59  0.423658093  0.42307150  0.02882336  0.41704980
60  0.635716694 -0.52379182 -0.02128646  0.24461080
61  1.662994152  0.38029046  0.88625905 -0.48951547
62  0.121082190 -0.05646920 -0.78054208 -1.38492434
63  0.175287422  0.47844240 -0.22462357 -0.53341224
64 -0.446777187  0.61601458 -0.41710104 -1.56613949
65 -1.574255303  0.97059607  0.06113318  0.30920100
66 -0.156014534  0.62767678 -0.53491205  1.29902904
67 -0.667989345 -0.59382251 -1.97296647  0.74700409
68  0.392087350  0.14113226 -1.75943584 -0.13100783
69  0.535882930 -0.61150960 -0.31674804  0.01083336
70  0.056259138  1.65543247  0.60543687  0.42589264
71 -0.487259844  0.19936361  0.56334387 -0.05766911
72 -0.354081146 -0.56148110  0.30203175  0.61567824
73 -0.408788455  0.36842423  0.97404720  1.28649512
74  0.645570912 -0.89356595  0.36980718  0.03653273
75  0.134090123 -1.37613265  1.04956448 -0.59465357
76 -0.009260849  1.22434023 -0.82052615 -1.47474232
77  0.806481594 -0.34188277 -0.23298394  0.53693179
78 -0.205043995 -0.77801833  0.36266405 -0.55192214
79 -0.549170948 -0.22064717 -0.30582529 -0.10020847
80 -0.453029245 -0.70817406 -0.40063964  0.16638564
81 -0.693323167  0.14868508 -0.25953446 -0.47638493
82 -1.475681288  1.15153356  0.50868150 -0.32717100
83 -0.053027450 -0.17643844  0.44094568  1.10805291
84  0.471638651 -0.84209082  0.68002545  0.58347119
85  0.001455407  0.12253235 -0.68664068 -0.79070487
86 -0.771568608  0.62602972  0.17251195 -0.38709239
87 -0.806147102  0.19150479 -0.24678894 -0.48106265

Clustering vector:
[1] 20 44 21 46 24  4 26  6 20 22  8  8 28 48  1 29 31 33 51 80 70 37 25 45  9
[26] 15 55 16 10  5 34 56  3 49 39 58 71 81 54 72 36 74 17 53 14 82 35 64 51 19
[51] 54 19 85 16 57 86 13 65 36 66 42 18 77 83 52 47 59 30 43 73 14  1 63 27 78
[76] 23 68 67 60  2 50 62 84  7 61 38 87 33 12 32 63 75  7 79 41 40 69 11 76  9

Within cluster sum of squares by cluster:
[1] 2.398700 0.000000 0.000000 0.000000 0.000000 0.000000 3.383687 2.133672
[9] 2.323156 0.000000 0.000000 0.000000 0.000000 3.217581 0.000000 6.327856
[17] 0.000000 0.000000 3.012637 2.293692 0.000000 0.000000 0.000000 0.000000
[25] 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
[33] 3.172946 0.000000 0.000000 1.706961 0.000000 0.000000 0.000000 0.000000
[41] 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
[49] 0.000000 0.000000 1.505519 0.000000 0.000000 1.516100 0.000000 0.000000
[57] 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1.046933 0.000000
[65] 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
[73] 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
[81] 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
(between_SS / total_SS =  96.5 %)

Available components:

[1] "cluster"      "centers"      "totss"        "withinss"     "tot.withinss"
[6] "betweenss"    "size"         "iter"         "ifault"
[1] "# of clusters violating given threshold condition:  5"
[1] "now.k= 10"
[1] "# of clusters violating given threshold condition:  10"
[1] "now.k= 20"
[1] "# of clusters violating given threshold condition:  18"
[1] "now.k= 38"
[1] "# of clusters violating given threshold condition:  14"
[1] "now.k= 52"
[1] "# of clusters violating given threshold condition:  2"
[1] "now.k= 54"
[1] "converged at k= 54"
\$cluster
[1] 12 53 16 50  3 32 10 26 11 27 29  5 33 41 23  8 26  9 37 11 30 31 52 44 48
[26] 34 15  6 25 10 17 27 13 41  4 36 25 38  7  1 34 40 19 42 19 33 35 52 37 13
[51]  7 13 54 22 28 33 45 14 34 42 21 13 20 20 17 18 35 46 43 16  1 24 21 47 50
[76] 49 43 18  1  2 37 32 20 29 46 24 53  9  2  5 21 39  7 54 28  6 39 20 51 48

\$centers
[,1]         [,2]         [,3]        [,4]         [,5]
[1,] -0.007820857 -0.039306509 -0.166337625 -0.64505290 -0.481405734
[2,] -0.098261690  0.311767701 -0.613567802  0.09136373  0.094510411
[3,] -0.118243674 -0.475171707 -0.389251281 -0.48879159 -0.080075303
[4,]  0.165071865 -0.098837173 -0.195369021  0.13255580  0.276791821
[5,] -0.658318214  0.124134878  0.115844357 -0.43486679  0.181319859
[6,] -0.371623370  0.246935191  0.413004571 -0.56554668 -0.249196650
[7,] -0.239956888  0.245379175  0.032943933  0.46991773 -0.241094327
[8,]  0.026753072 -0.170174156 -0.318646206  0.60333751 -0.245596384
[9,] -0.166188085  0.267683746  0.041044963  0.30579523  0.187166007
[10,]  0.089914999 -0.048779751  0.198654130  0.46962937  0.241188297
[11,]  0.024941754 -0.424528670 -0.207798156  0.44050909 -0.239309761
[12,] -0.300099881  0.136452634 -0.437062224  0.37453382 -0.133971579
[13,]  0.013421825 -0.256458297 -0.296337806 -0.13478308 -0.716902759
[14,]  0.079130339 -0.152083048  0.562755245  0.28785566 -0.064016841
[15,]  0.429660216  0.325453127 -0.142194753  0.45582219 -0.247687170
[16,]  0.007781366  0.359821327 -0.016837263 -0.11254145 -0.561730280
[17,]  0.015236527 -0.288126112 -0.170997793  0.10935093 -0.049933137
[18,]  0.153157414 -0.249884428  0.285213623 -0.04717932 -0.039847586
[19,]  0.601129359 -0.033362960 -0.055000812 -0.36738003 -0.191603867
[20,]  0.760186187  0.088704908 -0.242562555 -0.07313358 -0.057982025
[21,]  0.063144510 -0.498317790 -0.281569588  0.32585585 -0.003248908
[22,] -0.433923739  0.426234278  0.369836407 -0.17141043 -0.187327830
[23,]  0.364932583  0.173278405  0.362281934 -0.65274113 -0.021341600
[24,]  0.022522979 -0.003576665  0.326844052 -0.32127448  0.432669202
[25,] -0.573080346 -0.079079987  0.308516804  0.03631628  0.514953144
[26,] -0.688263287 -0.097246980  0.008995813 -0.19485452  0.240424624
[27,] -0.257549130  0.404979709 -0.013033862  0.60621627 -0.263851454
[28,] -0.348413298  0.415115379  0.251978940  0.39240852  0.249801730
[29,] -0.512207643  0.366038360 -0.009154882  0.19111761  0.331625937
[30,] -0.204735343 -0.023545891  0.488656157  0.19095026  0.317262168
[31,] -0.108440726 -0.584801382  0.168655394 -0.44903711 -0.589141718
[32,]  0.374212083 -0.257447353 -0.030726459 -0.26858185 -0.554591550
[33,]  0.105216340  0.392317610  0.499586740 -0.14853453 -0.205789745
[34,] -0.285026691 -0.319709943  0.101045450 -0.37915289 -0.371789592
[35,]  0.143182407 -0.378635907  0.807327353 -0.22522445 -0.171905562
[36,]  0.297201231 -0.265673692  0.529306394 -0.08342095  0.391447332
[37,] -0.286432297 -0.171014582  0.020071440 -0.02651185  0.242500104
[38,] -0.354021702 -0.552486798 -0.382919489  0.08683336  0.047071204
[39,] -0.168795299 -0.503263192 -0.446718296 -0.05563941  0.080732266
[40,]  0.080342834 -0.597969433  0.382948910  0.38701537 -0.103730909
[41,]  0.248116741  0.123917819  0.093978706  0.04283901 -0.390767081
[42,] -0.021449645 -0.332357117  0.425327296  0.23019798 -0.417712645
[43,] -0.278784705 -0.037097669 -0.274159371 -0.12792794  0.189564672
[44,]  0.349887310  0.572156495 -0.083592623  0.19436377 -0.197952098
[45,]  0.242967888 -0.630408053  0.211547819  0.24495487  0.080361221
[46,] -0.369850569 -0.521880553  0.187920468  0.35858793  0.156123538
[47,]  0.129125847 -0.162267440 -0.156690155 -0.05560396  0.584330464
[48,] -0.183793006  0.084985919  0.004136796 -0.53049002  0.145470493
[49,]  0.151910788  0.050325007  0.282932323  0.17268083  0.054804394
[50,]  0.520170622  0.136372417 -0.003494053 -0.29094515 -0.165421608
[51,]  0.201008875  0.281295508  0.511685501  0.14059460 -0.182975188
[52,]  0.021645756 -0.157601637  0.303307823 -0.21618681 -0.397267549
[53,]  0.243773849  0.576654432  0.145938246  0.05692691 -0.286556410
[54,]  0.625208064  0.237940815  0.470915497  0.12168103 -0.404195881
[,6]         [,7]         [,8]         [,9]       [,10]
[1,] -0.47892966  0.163467735 -0.197098509  0.165587193  0.02277387
[2,]  0.33243102  0.400572017  0.217954188 -0.262822179  0.33444386
[3,]  0.22259113  0.296413440  0.069468933  0.468861779 -0.03632376
[4,] -0.40752826  0.236844608  0.155396837  0.470638617 -0.60233309
[5,] -0.01811660 -0.533581202 -0.025055922  0.164755011  0.05470475
[6,] -0.12129074 -0.042761588 -0.237596578  0.254724990 -0.33245652
[7,] -0.20747682  0.089668473  0.406893352  0.572592475  0.24013309
[8,]  0.14273008  0.230488741  0.526147896 -0.043858198  0.30365080
[9,] -0.28338724 -0.379688189 -0.424606329 -0.510844264  0.32369207
[10,]  0.23144859 -0.418210373 -0.023554139 -0.233857408  0.62260451
[11,]  0.05857602 -0.298495558 -0.486676411 -0.419767087  0.13808236
[12,] -0.11700729 -0.414421555 -0.493394486 -0.239253276 -0.23655276
[13,] -0.25762839 -0.367680370  0.259607207 -0.193233468 -0.08843382
[14,] -0.17619589 -0.614285454  0.378733389  0.023854594  0.12065240
[15,] -0.15181998  0.267104254  0.425874075  0.361134786  0.11810655
[16,] -0.02600833 -0.161955732  0.383051535  0.410192760  0.44730908
[17,]  0.01059020  0.100287145 -0.508406563 -0.678392439 -0.37973254
[18,]  0.36177353 -0.205615982 -0.461209931 -0.619181956  0.24429723
[19,] -0.25405624  0.596743411  0.069584426 -0.183723310  0.05984704
[20,] -0.05996039  0.231482317 -0.260606169  0.308466526  0.35560496
[21,]  0.69824487  0.057987589  0.223898158 -0.073028395 -0.12588142
[22,]  0.48294563  0.239276191 -0.336762492 -0.145131491 -0.06181103
[23,] -0.17143961  0.089133096  0.050953974 -0.366379537 -0.32381730
[24,] -0.25593810 -0.075345700 -0.133397735 -0.307220783 -0.64720330
[25,]  0.38573971 -0.242758597  0.015731482  0.236659356 -0.19916086
[26,]  0.21977510  0.079991319  0.459232208  0.134022936 -0.37071201
[27,]  0.25761895  0.242538614 -0.107374308 -0.014292785 -0.44209525
[28,] -0.10785911  0.530748266 -0.113112549  0.279264292 -0.20566563
[29,]  0.30692268 -0.124608745  0.164431242  0.467671471  0.31873284
[30,]  0.29890953  0.021756963  0.640201475  0.234139167  0.16470445
[31,]  0.05483265 -0.054710073  0.009982840 -0.152616769  0.19922268
[32,]  0.31472784 -0.003910743  0.019983691 -0.368190279 -0.42190251
[33,] -0.02513408 -0.583954153  0.323584289  0.189242956 -0.19713882
[34,]  0.22875602  0.598445760 -0.031758123 -0.212037566  0.26060619
[35,]  0.17867471  0.194228042  0.008739356  0.027208833  0.18333776
[36,] -0.28611953 -0.059482010 -0.214815763 -0.374791670  0.35877080
[37,] -0.29335363  0.239620899 -0.338315636  0.022426489  0.75522418
[38,] -0.24208214 -0.462327149  0.099147344 -0.173064788 -0.31766670
[39,] -0.47435409  0.159797744 -0.462378015  0.163987044 -0.13353399
[40,] -0.19822691  0.298581966 -0.413281752  0.171038926  0.01689670
[41,] -0.27137286  0.377581685 -0.708263038  0.014186104  0.20412602
[42,]  0.37767819  0.036001569  0.406927586 -0.137591914  0.39018183
[43,]  0.65160157  0.200842541  0.350292333 -0.420454361 -0.17038265
[44,]  0.19460868 -0.335642624  0.095568511 -0.517111648  0.19798858
[45,]  0.32226971  0.282122196  0.200491553  0.386575429  0.24341502
[46,] -0.04556932  0.565391343  0.281343752 -0.022737737 -0.03408869
[47,]  0.47794958 -0.016370393  0.031766483 -0.108811972  0.58852115
[48,]  0.07307538 -0.325309165  0.415707574 -0.004010778  0.61024925
[49,]  0.06386797 -0.568392039 -0.467952882 -0.295743152 -0.47741500
[50,]  0.36311192 -0.361494326 -0.562211251  0.049995911 -0.13300375
[51,]  0.24841127 -0.003152297  0.416752672 -0.279298560 -0.50198694
[52,]  0.56742172 -0.172243429  0.373689768 -0.017820869 -0.43190563
[53,]  0.48746479 -0.441174936  0.113773266 -0.129303110 -0.19867022
[54,]  0.23632368 -0.113604420 -0.018915506 -0.213941691 -0.19409628

\$size
[1] 3 2 1 1 2 2 3 1 2 2 2 1 4 1 1 2 2 2 2 4 3 1 1 2 2 2 2 2 2 1 1 2 3 3 2 1 3 1
[39] 2 1 2 2 2 1 1 2 1 2 1 2 1 2 2 2
```

akmeans documentation built on May 2, 2019, 2:40 a.m.