def test_DBSCAN(*data):
'''
test the DBSCAN method
:param data: train, target
:return: None
'''
X,labels_true=data
clst=cluster.DBSCAN()
predicted_labels=clst.fit_predict(X)
print("ARI:%s"% adjusted_rand_score(labels_true,predicted_labels))
print("Core sample num:{0}".format(len(clst.core_sample_indices_)))
评论列表
文章目录