Skip to content

ENH propagate eigen_tol to all eigen solver - #23210

Merged
jeremiedbb merged 42 commits into
scikit-learn:mainfrom
Micky774:eigen_tol
Jun 1, 2022
Merged

jeremiedbb merged 42 commits into
scikit-learn:mainfrom
Micky774:eigen_tol

Conversation

@Micky774

@Micky774 Micky774 commented Apr 24, 2022 •

Copy link
Copy Markdown
Contributor

Reference Issues/PRs

closes #21243
Resolves #11968 (stalled)

What does this implement/fix? Explain your changes.

PR #11968: Propagate the eigen_tol for the 'arpack', 'amg', and 'lobpcg' solvers.

This PR:

  • Adds tests

Any other comments?

Follow up PRs to:

  • Add "auto" option for eigen_tol
  • Begins deprecation where appropriate to update default eigen_tol=0 to eigen_tol="auto"

Comment thread sklearn/cluster/tests/test_spectral.py Resolved
Comment thread sklearn/cluster/_spectral.py Resolved
Comment thread sklearn/cluster/_spectral.py Resolved
Comment thread sklearn/cluster/_spectral.py Resolved
Comment thread sklearn/manifold/_spectral_embedding.py Resolved
Comment thread sklearn/cluster/tests/test_spectral.py Resolved

@jeremiedbb jeremiedbb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we really a deprecation cycle. Currently eigen_tol is only used with the arpack solver. "auto" will not change the default value in that case, i.e. 0. So directly changing to "auto" is not really backward incompatible, just if a user relies on default values from the signature of the estimator which we chose to ignore several times in the past.

@thomasjpfan

Copy link
Copy Markdown
Member

Currently eigen_tol is only used with the arpack solver. "auto" will not change the default value in that case, i.e. 0.

I agree we can switch to "auto" right away in this PR without deprecation.

Comment thread sklearn/cluster/_spectral.py Resolved
Comment thread sklearn/cluster/_spectral.py Resolved
Comment thread sklearn/cluster/_spectral.py Resolved
Comment thread sklearn/manifold/_spectral_embedding.py Resolved
Comment thread sklearn/cluster/_spectral.py Resolved
Comment thread sklearn/manifold/_spectral_embedding.py Resolved
Comment thread sklearn/manifold/_spectral_embedding.py Resolved
Comment thread sklearn/manifold/_spectral_embedding.py Resolved
Comment thread doc/whats_new/v1.2.rst Resolved

@thomasjpfan thomasjpfan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some minor comments. After the merge conflict is address, LGTM.

@jeremiedbb jeremiedbb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @Micky774 !

@jeremiedbb
jeremiedbb merged commit 1fbf5a0 into scikit-learn:main Jun 1, 2022
@Micky774
Micky774 deleted the eigen_tol branch June 2, 2022 01:13
@glemaitre

Copy link
Copy Markdown
Member

It seems that we introduce an issue with PyPy: #23520

ogrisel pushed a commit to ogrisel/scikit-learn that referenced this pull request Jul 11, 2022
Co-authored-by: Joan Massich <[email protected]>
Co-authored-by: Guillaume Lemaitre <[email protected]>
Co-authored-by: Thomas J. Fan <[email protected]>
Co-authored-by: Jérémie du Boisberranger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

5 participants