You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @amueller. I would like to take a shot at this. I can see it's demanding but would still like to take a look. Is it OK, or is someone already looking at it?
After reading the issues and PRs referenced here and also studying the spectral clustering implementation, I understand that this enhancement's goal is to refactor the logic for chosing an eigen solver in function spectral_embedding() located in manifold/spectral_embedding.py
I opened a [WIP ] PR #15136, where I show an inital suggestion for refactoring spectral_embedding(). My intention is just to present an idea for simplifing the logic that choses the solver. It felt easier to write code, then to write a design document. I hope to get feed-back that will focus me onwards.
I also intend to add more regressinon tests, but I thought to work on the tests only after the refactoring goal becomes more clear to me.
After we finish the refactoring and achieve a clear code, there are a couple of candidates for improving the algorithm. I found those by reading the issues referenced here. For now I have 2 ideas based on @lobpcg suggestions .
call scipy.linalg.eigh() always if n_nodes < 5 * n_components.
Meaning, if number of samples is smaller than the (number_of_requested_eigen_vectors x 5)
original comment: Amg arpack workaround fix #14647 (comment)
When calling arpack with shift-invert use a sigma value of -1e-5 instead of 1.0 and do not multiply the laplacian by -1, just before calling arpack
original comment: Amg arpack workaround fix #14647 (comment)
Activity
alexshacked commentedon Sep 24, 2019
Hi @amueller. I would like to take a shot at this. I can see it's demanding but would still like to take a look. Is it OK, or is someone already looking at it?
amueller commentedon Sep 25, 2019
@alexshacked please go for it!
alexshacked commentedon Sep 25, 2019
Thank you, I will have a design based on #10715 (comment), #14647 (comment), #10720 (comment) in a couple of days
ENH refactored logic for chosing eigen solver (scikit-learn#14713)
alexshacked commentedon Oct 4, 2019
After reading the issues and PRs referenced here and also studying the spectral clustering implementation, I understand that this enhancement's goal is to refactor the logic for chosing an eigen solver in function spectral_embedding() located in manifold/spectral_embedding.py
I opened a [WIP ] PR #15136, where I show an inital suggestion for refactoring spectral_embedding(). My intention is just to present an idea for simplifing the logic that choses the solver. It felt easier to write code, then to write a design document. I hope to get feed-back that will focus me onwards.
I also intend to add more regressinon tests, but I thought to work on the tests only after the refactoring goal becomes more clear to me.
ENH logic for eigen solver - PEP8 issues (scikit-learn#14713)
ENH logic for eigen solver - PEP8 issues 2 (scikit-learn#14713)
alexshacked commentedon Oct 7, 2019
After we finish the refactoring and achieve a clear code, there are a couple of candidates for improving the algorithm. I found those by reading the issues referenced here. For now I have 2 ideas based on @lobpcg suggestions .
call scipy.linalg.eigh() always if n_nodes < 5 * n_components.
Meaning, if number of samples is smaller than the (number_of_requested_eigen_vectors x 5)
original comment: Amg arpack workaround fix #14647 (comment)
When calling arpack with shift-invert use a sigma value of -1e-5 instead of 1.0 and do not multiply the laplacian by -1, just before calling arpack
original comment: Amg arpack workaround fix #14647 (comment)
@amueller what do you think?
ENH logic for eigen chossing solver - improve comment (scikit-learn#1…
ENH logic for eigen chossing solver - shorten comment for PIP (scikit…
ENH logic for eigen chossing solver - shorten comment (scikit-learn#1…
jeremiedbb commentedon May 5, 2026
done in #33262