Hemantakumar Hegde
28-02-2020
You can open the shiny application here https://equalstrue.shinyapps.io/CourseProject/.
library(ggplot2)
data("iris")
set.seed(5000)
num_cluster<- 3
irisCluster <- kmeans(iris[, 0:3], num_cluster, nstart = 20)
scatter <- ggplot(data=iris, aes(x = Sepal.Length, y = Sepal.Width))
scatter <- scatter + geom_point(aes(color=as.factor( irisCluster$cluster), shape=Species)) +
xlab("Sepal Length") + ylab("Sepal Width") +
ggtitle("Sepal Length-Width")
# plot on the next slide >>