Displaying 1 result from an estimated 1 matches for "clustercenters".
2010 Jan 11
1
K-means recluster data with given cluster centers
...a.matrix)[1], Nclust) # this is the initial Nclust prototypes
km <- kmeans(data.matrix, centers=data.matrix[init,], iter.max=Imax)
# WRITE OUT CLUSTER CENTERS
km$centers # print cluster center (columns: dim component; rows: clusters)
km$size # print amount of data in each cluster
clusterCenters=km$centers
save(file="clusterCenters.RData", list='clusterCenters') # Beispiel
write.table(km$centers, file = "clusterCenters.dat", sep = ",", col.names= FALSE, row.names= FALSE)
2: R code to recluster new data
#---RECLUSTER NEW DATA WITH GIVEN CLUST...