File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,28 +52,6 @@ def test_spectral_clustering():
5252 assert_array_equal (model_copy .labels_ , model .labels_ )
5353
5454
55- def test_spectral_lobpcg_mode ():
56- # Test the lobpcg mode of SpectralClustering
57- # We need a fairly big data matrix, as lobpcg does not work with
58- # small data matrices
59- centers = np .array ([
60- [0. , 0. ],
61- [10. , 10. ],
62- ])
63- # The cluster_std parameter has been selected to have the blob close enough
64- # to get stable results both with the ATLAS and the reference
65- # implementations of LAPACK.
66- X , true_labels = make_blobs (n_samples = 300 , centers = centers ,
67- cluster_std = 20.0 , random_state = 42 )
68- D = pairwise_distances (X ) # Distance matrix
69- S = np .max (D ) - D # Similarity matrix
70- labels = spectral_clustering (S , n_clusters = len (centers ),
71- random_state = 0 , eigen_solver = "lobpcg" )
72- # We don't care too much that it's good, just that it *worked*.
73- # There does have to be some lower limit on the performance though.
74- assert_greater (np .mean (labels == true_labels ), .3 )
75-
76-
7755def test_spectral_amg_mode ():
7856 # Test the amg mode of SpectralClustering
7957 centers = np .array ([
You can’t perform that action at this time.
0 commit comments