library(amap)
set.seed(5)
Kmeans(mydata, 5, iter.max=500, nstart=1, method="euclidean")
in 'amap' package and run several times, but even though the parameters and seed value are always the same, the clustering results are different every time I run Kmeans, or other cluster methods.
I tried another kmeans function in different packages, but still the same...
In fact, I want to use the Weka and R together, so I also tried SimpleKMeans
in RWeka package, and this gives always the same value. However, the problem is that I do not know how to store the clustered data along with the cluster number from SimpleKmeans in RWeka so I'm stuck...
Anyhow, how can I keep the clustering result always the same? or How can I store the clustering result from SimpleKmeans
into R?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…