-
Notifications
You must be signed in to change notification settings - Fork 886
Open
Description
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")
Metadata
Metadata
Assignees
Labels
No labels