2018.2.6
# DBSCAN begins
db = cluster.DBSCAN(eps=0.1, min_samples=150, n_jobs=-1)
db.fit(first_set)
r = pd.concat([first_set, pd.Series(db.labels_, index=first_set.index)], axis=1)
r.columns = list(first_set.columns) + [u'聚类类别']
# print(r)
r.to_excel("../output/dbscanSet_1.xlsx")
p_labels = list(db.labels_)
print(list(set(list(db.labels_))))
if len(list(set(list(db.labels_)))) == 4:
print(metrics.fowlkes_mallows_score(tLabel, p_labels))