mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-12-26 01:29:10 +00:00
Update visualization.py
This commit is contained in:
parent
18fdd6e7c2
commit
ad8e3cc4e5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user