Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def train_spectral_clustering(data, cluster_num):
"""
训练谱聚类模型
"""
model = SpectralClustering(n_clusters=cluster_num, affinity="rbf",
gamma=100, assign_labels="kmeans")
model.fit(data)
return model