Skip to content

Investigate test_precomputed_nearest_neighbors_filtering[60] failure on CI #31262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sklearn/cluster/tests/test_spectral.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ def test_precomputed_nearest_neighbors_filtering(global_random_seed):
X, y = make_blobs(
n_samples=250,
random_state=global_random_seed,
centers=[[1, 1], [-1, -1]],
centers=[[1, 1, 1], [-1, -1, -1]],
cluster_std=0.01,
)

n_neighbors = 2
results = []
for additional_neighbors in [0, 10]:
nn = NearestNeighbors(n_neighbors=n_neighbors + additional_neighbors).fit(X)
graph = nn.kneighbors_graph(X, mode="connectivity")
graph = nn.kneighbors_graph(X, mode="distance")
labels = (
SpectralClustering(
random_state=global_random_seed,
Expand Down