Визуализация PAM-кластеров - PullRequest
0 голосов
/ 11 марта 2020

Я использую алгоритм PAM для кластеризации и хотел бы визуализировать результаты. enter code here

# Computing PAM Clustering

pam.res <- pam(WKA_ohneJB_sam, 4)

print(pam.res)

# Adding Point Classification

point_class <- cbind(WKA_ohneJB_sam, cluster = pam.res$cluster) 
head(point_class, n=20)

# Cluster Mediods

pam.res$medoids

# Visualizing PAM Clusters

fviz_cluster (pam.res, 
              palette = c("#00AFBB", "#FC4E07", "#2E9FDF", "#006600"), # color palette
              ellipse.type = "t",  #Concentration ellipse 
              repel = TRUE, # Avoid label overplotting (slow) 
              ggtheme = theme_classic() 
              )
>  
> Error : The dimension of the data < 2! No plot. 

Что именно я должен изменить в моем синтаксисе?

enter image description here

...