所以我有一些字符串数据,需要对其进行一些操作,然后使用HDBSCAN创建集群:
textData = train['eudexHash'].apply(lambda x: str(x))
clusterer = hdbscan.HDBSCAN(min_cluster_size=5,gen_min_span_tree=True,prediction_data=True).fit(textData.values.reshape(-1,1))
现在,当我调用聚类以使用approximate_predict进行预测时,我得到了以下结果:
>>>> hdbscan.approximate_predict(clusterer,testCase)
(array([113]),array([1.]))
很甜,看起来它正在预测新的情况,因此它认为新的字符串值对应于标签[113]。现在,如何找到该标签/存储桶/群集中的其他成员?
干杯!