简体   繁体   中英

Simple dendogram trouble in r programming using hclust

I have a dataset where i am trying to cluster a column with 986 observations with the below code.

PremiumPrice_Sclaed <- scale(data$PremiumPrice)
plot(PremiumPrice_Sclaed)

d <- dist(PremiumPrice_Sclaed) #scale for cluster
fit.average <- hclust(d, method="average")
plot(fit.average, cex = .1 ,main="Average Linkage Clustering")

can someone please tell me how to fix the below dendogram?

在此处输入图像描述

You probably want to remove the labels.

hc <- hclust(dist(rbind(USArrests, USArrests, USArrests)), "ave")

par(mfrow=c(1, 2))
plot(hc, hang=-1, sub='w/ labels')
plot(hc, hang=-1, labels=FALSE, sub='w/o labels')

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM