2016-03-28 62 views
0

我使用k-means算法進行聚類,但我不確定如何根據結果決定k的最佳最佳值。 對於離,我已經申請k均值上對於k = 10的數據集:決定weka中k-means算法的最佳'k'

kMeans 
====== 

Number of iterations: 16 
Within cluster sum of squared errors: 38.47923197081721 
Missing values globally replaced with mean/mode 

Cluster centroids: 
                 Cluster# 
Attribute       Full Data     0     1     2     3     4     5     6     7     8     9 
             (214)     (16)     (9)     (13)     (23)     (46)     (12)     (11)     (40)     (15)     (29) 
============================================================================================================================================================================================================================================================== 
RI         1.5184    1.5181    1.5175    1.5189    1.5178    1.5172    1.519    1.5255    1.5175    1.5222    1.5171 
Na         13.4079    12.9988    14.6467    12.8277    13.2148    13.1896    13.63    12.6318    13.0518    13.9107    14.4421 
Mg         2.6845    3.4894    1.3056    0.7738    3.4261    3.4987    3.4917    0.2145    3.4958    3.8273    0.5383 
Al         1.4449    1.1844    1.3667    2.0338    1.3552    1.4898    1.3308    1.1891    1.2617    0.716    2.1228 
Si         72.6509    72.785    73.2067    72.3662    72.6526    72.6989    72.07    72.0709    72.9532    71.7467    72.9659 
K          0.4971    0.4794     0     1.47    0.527     0.59    0.4108    0.2345    0.547    0.1007    0.3252 
Ca          8.957    8.8069    9.3567    10.1238    8.5648    8.3041     8.87    13.1291    8.5035    9.5887    8.4914 
Ba          0.175    0.015     0    0.1877    0.023    0.003    0.0667    0.2864     0     0     1.04 
Fe          0.057    0.2238     0    0.0608    0.2013    0.0104    0.0167    0.1109    0.011    0.0313    0.0134 
Type     build wind non-float  build wind float   tableware   containers build wind non-float build wind non-float  build wind float build wind non-float  build wind float  build wind float   headlamps 

回答

1

存在用於在決定爲「K」的最佳值的各種方法K-means算法拇指規則,肘方法,輪廓方法等。在我的工作中,我習慣了從肘法獲得的結果,並取得了成功,我在R語言中完成了所有分析。 下面是這些方法的描述的鏈接link 試着找到給定鏈接的子鏈接,建立一個適用於你的數據的方法&的任何一種方法的代碼。

我希望這會幫助你,如果不是,我很抱歉。

所有與您的工作最好。

+0

非常有用.... – Aquarius24