I use MCLUST and specifically specify K=3 clusters, with the covariance matrix type is VII.
library(mclust)
mc <- Mclust(iris[,-5], G = 2)
How to create a figure like below? It's from my textbook: Applied Multivariate Statistical Analysis by Johnson and Wichern. Notice that this figure has 2 clusters (squares and triangles) in each figure. So the textbook has a mistake here. The textbook used 2 clusters.
CodePudding user response:
If you would like to modify the shape based on cluster assignment, you can do so through the use of pch
. Using your data:
pairs(mc$data, pch = mc$classification)
If you want to change the shapes, you can map the classification assignment to the desired shape.