question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

eigen_tol in _spectral_embedding.py does not propagate to solvers other than arpack

See original GitHub issue

Describe the bug

In _spectral_embedding.py the option

    eigen_tol : float, default=0.0
        Stopping criterion for eigendecomposition of the Laplacian matrix
        when ``eigen_solver='arpack'``.

does not appear to propagate to solvers ‘amg’ and ‘lobpcg’, e.g., adding eigen_tol and changing its value in examples/cluster/plot_coin_segmentation.py affects the outcome only if eigen_solver='arpack', which is the default but not for the other two: ‘lobpcg’ and ‘amg’.

Steps/Code to Reproduce

See above

Expected Results

eigen_tol works for all supported solvers

Actual Results

eigen_tol works for `eigen_solver=‘arpack’ only and is ignored otherwise

While at it

Also introduce and pass max_iter param to all eigen solvers, although maybe it should be named eigen_max_iter to avoid confusion.

Versions

System: python: 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] executable: C:\Users\Name\AppData\Local\Programs\Python\Python37\python.exe
machine: Windows-10-10.0.19041-SP0

Python dependencies: pip: 21.2.4 setuptools: 58.1.0 sklearn: 1.0 numpy: 1.21.2 scipy: 1.7.1 Cython: 0.29.24 pandas: 1.3.3 matplotlib: 3.4.3 joblib: 1.0.1 threadpoolctl: 2.2.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
thomasjpfancommented, Oct 8, 2021

To be backward compatible, we can have eigen_tol=None and pass in 0 to arpack, which is machine precision internally. For lobpcg and amg, we continue to pass in 1e-5 when eigen_tol=None. If eigen_tol is a float, we can pass it in directly.

Does this sound reasonable?

0reactions
lobpcgcommented, Dec 17, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

sklearn.manifold.SpectralEmbedding
Spectral embedding for non-linear dimensionality reduction. Forms an affinity matrix given by the specified function and applies spectral decomposition to ...
Read more >
Sparse eigenvalue problems with ARPACK — SciPy v1.9.3 ...
This operation is performed through a reverse-communication interface. The result of this structure is that ARPACK is able to find eigenvalues and eigenvectors ......
Read more >
RAVEN User Manual - INL Digital Library
a 32-bit version of MSYS2 available, the RAVEN installation described here will not work with it. • At least 7 Gigabytes of available...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found