Open agent18 opened 5 years ago
Please correct this. Its in the coursera slides as well. kmeansObj2$cluster needs to be used instead of kmeansObj$cluster. Like me many people spent time to understand what it was supposed to do, when it is a really simple thing
kmeansObj2$cluster
kmeansObj$cluster
set.seed(1234) dataMatrix <- as.matrix(dataFrame)[sample(1:12), ] kmeansObj2 <- kmeans(dataMatrix, centers = 3) par(mfrow = c(1, 2), mar = c(2, 4, 0.1, 0.1)) image(t(dataMatrix)[, nrow(dataMatrix):1], yaxt = "n") image(t(dataMatrix)[, order(kmeansObj2$cluster)], yaxt = "n")
From this part: https://github.com/jtleek/modules/tree/master/04_ExploratoryAnalysis/kmeansClustering; Sorry I don't know the proper way of submitting requests!
Please correct this. Its in the coursera slides as well.
kmeansObj2$cluster
needs to be used instead ofkmeansObj$cluster
. Like me many people spent time to understand what it was supposed to do, when it is a really simple thingHeatmaps