2016-05-18 8 views
0

を見ずに多数決に従ってNbClust()から最適なクラスタ数を取得rは:</p> <pre><code>nc <- NbClust(df, distance="euclidean", min.nc=2, max.nc=10, method="complete") </code></pre> <p>と私のコンソールに次のような出力が得られます:私は一次元データに<code>NbClust()</code>を実行しているコンソール

[1] "Frey index : No clustering structure in this data set" 
*** : The Hubert index is a graphical method of determining the number of clusters. 
       In the plot of Hubert index, we seek a significant knee that corresponds to a 
       significant increase of the value of the measure i.e the significant peak in Hubert 
       index second differences plot. 

*** : The D index is a graphical method of determining the number of clusters. 
       In the plot of D index, we seek a significant knee (the significant peak in Dindex 
       second differences plot) that corresponds to a significant increase of the value of 
       the measure. 

******************************************************************* 
* Among all indices:             
* 1 proposed 4 as the best number of clusters 
* 1 proposed 8 as the best number of clusters 
* 2 proposed 9 as the best number of clusters 
* 2 proposed 10 as the best number of clusters 

        ***** Conclusion *****        

* According to the majority rule, the best number of clusters is 9 


******************************************************************* 

私はそれを見ずに(上記の出力の最後の行で)値「9」を取得できますか?

ありがとうございました!次のように

正規化されたデータが見えます:zx8754へ

df <- structure(list(V1 = c(-0.142196220923589, 4.3271395706369, 5.00420146139183, 
    -0.292948282536991, -0.292948282536991, -0.292948282536991, -0.191455118249021, 
    -0.292948282536991, -0.292948282536991, -0.292948282536991, 1.04365387777657, 
    0.150712390018241, -0.275757257967042, -0.292948282536991, -0.292948282536991, 
    0.00392748792098075, -0.0235120320656692, 0.150712390018241, 
    -0.292948282536991, 0.22278245456149, -0.292948282536991, -0.292948282536991, 
    0.0888908208916921, -0.292948282536991, -0.269806518692829, -0.292948282536991, 
    -0.292948282536991, -0.292948282536991, -0.292948282536991, -0.287328139889123, 
    -0.030454561218918, 0.25980927671215, -0.292948282536991, -0.223192394378158, 
    -0.292948282536991, -0.292948282536991, -0.292948282536991, 0.0657490570475295, 
    -0.292948282536991, -0.292948282536991, -0.292948282536991, -0.215258075345874, 
    0.0862460478809306, 0.0862460478809306, -0.522051744594201, -0.518084585078059, 
    -0.496595804365622, -0.522051744594201, -0.516431601946333, -0.518084585078059 
    )), .Names = "V1", row.names = c(NA, -50L), class = "data.frame") 

答えて

2

おかげで、私は次のようにコンソール出力から必要な値を得られることが分かった

length(unique(nc$Best.partition)) 
関連する問題

 関連する問題