Advertisement
lancernik

AdpKolos

May 28th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #from sklearn.datasets.samples_generator import make_blobs
  2. #x, y = make_blobs(n_samples=250, n_features=15, centers=5, cluster_std=1.0)
  3. #
  4. #from sklearn.cluster import SpectralClustering
  5. #
  6. #cluster = SpectralClustering(n_clusters=5)
  7. #
  8. #Y = cluster.fit_predict(x)
  9. #
  10. #from sklearn.model_selection import ShuffleSplit
  11. #XY=np.stack((x,y))
  12. #_,_,_,_, train_test_split(XY, split_ratio=0.7)
  13. #_,_,_,_, train_test_split(_,_, split_ratio=0.5)
  14. #for i in range(15):
  15. # pca = decomposition.PCA(i)
  16. # pca.fit(x)
  17. # total_variance = np.sum(pca.explained_variance_ratio_)
  18. # if total_variance > 0.95:
  19. # break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement