Hierarchical clustering based on principal components in R language: different choices of main points

library(FactoMineR)
# Compute PCA with ncp = 3
res.pca <- PCA(USArrests, ncp = 3, graph = FALSE)
# Compute hierarchical clustering on principal components
res.hcpc <- HCPC(res.pca, graph = FALSE)
fviz_dend(res.hcpc, 
          cex = 0.7,                     # Label size
          palette = "jco",               # Color palette see ?ggpubr::ggpar
          rect = TRUE, rect_fill = TRUE, # Add rectangle around groups
          rect_border = "jco",           # Rectangle color
          labels_track_height = 0.8      # Augment the room for labels
)

insert image description here

# Principal components + tree
plot(res.hcpc, choice = "3D.map")

insert image description here

plot(res.hcpc, choice = "tree")

insert image description here

plot(res.hcpc, choice = "bar")

insert image description here

plot(res.hcpc, choice = "map")

insert image description here

References : http://www.sthda.com/english/articles/31-principal-component-methods-in-r-practical-guide/117-hcpc-hierarchical-clustering-on-principal-components-essentials/Development Tools: RStudio and WeChat Alt+A screenshot tool

Guess you like

Origin blog.csdn.net/m0_38127487/article/details/132087309