From cc6a7697cfc2baae53992f53891f1fffc83af664 Mon Sep 17 00:00:00 2001 From: jlevine18 Date: Thu, 20 Dec 2018 22:01:28 -0600 Subject: [PATCH] Update visualization.py --- data analysis/visualization.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data analysis/visualization.py b/data analysis/visualization.py index b888ef3b..95e7e3c7 100644 --- a/data analysis/visualization.py +++ b/data analysis/visualization.py @@ -125,6 +125,7 @@ def kmeans(data, num_clusters): #Spectral Clustering- Seems to work really well def spectral(data, num_clusters): td_norm=StandardScaler().fit_transform(data) - db = SpectralClustering(n_clusters=num_clusters).fit(td) + db = SpectralClustering(n_clusters=num_clusters, eigen_solver='arpack', + affinity="nearest_neighbors").fit(td) y=db.labels_.astype(np.int) return y