Skip to content

MNT: change default n_init to 1 in MDS and smacof as planned for 1.9 - #33595

Merged
jeremiedbb merged 11 commits into
scikit-learn:mainfrom
Julian901:fix/mds-n-init-default-1.9
Mar 24, 2026
Merged

jeremiedbb merged 11 commits into
scikit-learn:mainfrom
Julian901:fix/mds-n-init-default-1.9

Conversation

@Julian901

@Julian901 Julian901 commented Mar 22, 2026 •

Copy link
Copy Markdown
Contributor

Implements the planned change for 1.9: change default n_init to 1 in both smacof function and MDS class, as indicated by TODO comments referencing PR #31117.

Changes:

  • Remove "warn" sentinel value from n_init parameter validation in smacof
  • Change default n_init from "warn" (resolving to 8) to 1 in smacof
  • Change default n_init from "warn" (resolving to 4) to 1 in MDS.__init__
  • Remove FutureWarning blocks that warned about this change
  • Update docstrings to reflect the new defaults
  • Remove TODO(1.9) comments that are now resolved
  • Remove obsolete tests for the n_init FutureWarning

closes #33598

@github-actions github-actions Bot added the CI:Linter failure The linter CI is failing on this PR label Mar 22, 2026
@github-actions github-actions Bot removed the CI:Linter failure The linter CI is failing on this PR label Mar 22, 2026

@betatim betatim 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.

Thanks for helping with deprecations.

LGTM modulo the two suggestions to keep the parameter name in the message.

Comment thread sklearn/manifold/_mds.py Resolved
Comment thread sklearn/manifold/_mds.py Resolved
@betatim betatim added Quick Review For PRs that are quick to review Waiting for Second Reviewer First reviewer is done, need a second one! labels Mar 23, 2026
@betatim

betatim commented Mar 23, 2026

Copy link
Copy Markdown
Member

Another note @Julian901: please use the PR template when creating a PR. We want to hear from the PR authors directly in their own voice (if we want to talk to AI we all have access to it directly :D). Often AI Agents/tools that write PR descriptions do not follow the template and we get a lot of spam PRs from AI tools. This means we might close PRs that don't use the template without even looking at the content. So to give your work the best chance of being seen, use the template and fill it out the old school way (you can ask AI to help with translation or improving clarity if you want to).

@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.

Thanks for the PR @Julian901

Comment thread sklearn/manifold/_mds.py Resolved
@github-actions github-actions Bot added the CI:Linter failure The linter CI is failing on this PR label Mar 24, 2026
@github-actions github-actions Bot removed the CI:Linter failure The linter CI is failing on this PR label Mar 24, 2026
@Julian901

Copy link
Copy Markdown
Contributor Author

Done, guys, thank you! Removed changelog entry, replaced self._n_init with self.n_init directly, and updated the docstring wording.

Sorry about the PR description - I'll write it manually next time following the template <3.

@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 @Julian901

@jeremiedbb
jeremiedbb merged commit 6073302 into scikit-learn:main Mar 24, 2026
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:manifold No Changelog Needed Quick Review For PRs that are quick to review Waiting for Second Reviewer First reviewer is done, need a second one!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MNT: Implement TODO(1.9) - change default n_init to 1 in MDS and smacof

3 participants