首页 > 解决方案 > Using hierarchical clustering with an single linkage in R

问题描述

I am supposed to use Hierarchial clustering with a single linkage in R with the data frame hotels.std

my code:

dist_mat = dist(features, method = "euclidean") 
hc_single = hclust(dist_mat, method = "single", members = as.factor(hotels$Hotel_Address))```

my error: 
Error in hclust(dist_mat, method = "single", members = as.factor(hotels$Hotel_Address)) : invalid length of members

标签: rdataframehierarchical-clustering

解决方案


推荐阅读