Skip to content
Merged
Show file tree
Hide file tree
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: 4 additions & 0 deletions doc/whats_new/v1.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,10 @@ Changelog
every infinite distances to zero. :pr:`20531` by `Roman Yurchak`_ and `Tom
Dupre la Tour`_.

- |Fix| Decrease the numerical default tolerance in the lobpcg call
in :func:`manifold.spectral_embedding` to prevent numerical instability.
:pr:`21194` by :user:`Andrew Knyazev <lobpcg>`.

:mod:`sklearn.metrics`
......................

Expand Down
2 changes: 1 addition & 1 deletion sklearn/manifold/_spectral_embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def spectral_embedding(
X = random_state.rand(laplacian.shape[0], n_components + 1)
X[:, 0] = dd.ravel()
_, diffusion_map = lobpcg(
laplacian, X, tol=1e-15, largest=False, maxiter=2000
laplacian, X, tol=1e-5, largest=False, maxiter=2000
)
embedding = diffusion_map.T[:n_components]
if norm_laplacian:
Expand Down