hdbscan

how to print output results in HDBSCAN

笑着哭i 提交于 2019-12-11 18:26:45
问题 I have ASCII data and i need to cluster the data using HDBSCAN. I got the lables but i don't know how to print the output cluster results i.e unique and segregated results from hdbscan. snippet: import hdbscan import numpy as np datafile = "ascii.txt" data = np.loadtxt(datafile, dtype = np.uint8) clusterer = hdbscan.HDBSCAN(min_cluster_size = 20) clusterer.fit(data) print (np.unique(clusterer.labels_, return_counts = True)) 回答1: You can use Pandas to read the file and then print out the