Reputation: 11
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?
Upvotes: 1
Views: 41
Reputation: 73692
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')
Upvotes: 1