Wrong resulting picture
agent18 opened this issue · 1 comments
agent18 commented
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
Heatmaps
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")
agent18 commented
From this part: https://github.com/jtleek/modules/tree/master/04_ExploratoryAnalysis/kmeansClustering; Sorry I don't know the proper way of submitting requests!