Skip to content

Commit 42663e4

Browse files
committed
Merge pull request #3025 from ogrisel/remove-unstable-lobpcg-test
[MRG] Remove redundant yet unstable test_spectral_lobpcg_mode
2 parents 86f8577 + 2495327 commit 42663e4

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

sklearn/cluster/tests/test_spectral.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff 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-
7755
def test_spectral_amg_mode():
7856
# Test the amg mode of SpectralClustering
7957
centers = np.array([

0 commit comments

Comments
 (0)