我想用 Python ( pyclustering
) 中的库对 R 中的一些数据进行聚类。我正在使用reticulate
包来执行此操作:
library(reticulate)
# create some random array
np <- import("numpy", convert = FALSE)
dat <- np$random$rand(100,2)
# clustering with CURE
clus_cure <- import("pyclustering.cluster.cure")
clus_res <- clus_cure$cure(dat, 2)
clus_res$get_clusters()
但它返回NULL
。
请问哪里有问题?