Skip to content

Change default quantile_method to averaged_inverted_cdf in KBinsDiscretizer - #33763

Merged
jeremiedbb merged 9 commits into
scikit-learn:mainfrom
AshutoshDevpura:fix/discretization-quantile-method-default
Apr 17, 2026
Merged

jeremiedbb merged 9 commits into
scikit-learn:mainfrom
AshutoshDevpura:fix/discretization-quantile-method-default

Conversation

@AshutoshDevpura

Copy link
Copy Markdown
Contributor

The quantile_method parameter in KBinsDiscretizer had a TODO(1.9) to
switch the default from "linear" to "averaged_inverted_cdf". Now at
v1.9.dev0, this PR implements that change.

Changes:

  • Change default quantile_method from "warn" to "averaged_inverted_cdf"
    in __init__
  • Remove "warn" from _parameter_constraints
  • Remove the FutureWarning block
  • Update docstring to reflect new default and add versionchanged note
  • Remove test_quantile_method_future_warnings test
  • Add changelog entry

@github-actions github-actions Bot added module:preprocessing CI:Linter failure The linter CI is failing on this PR labels Apr 16, 2026
@github-actions github-actions Bot removed the CI:Linter failure The linter CI is failing on this PR label Apr 16, 2026
@github-actions github-actions Bot added the CI:Linter failure The linter CI is failing on this PR label Apr 16, 2026
@github-actions github-actions Bot removed the CI:Linter failure The linter CI is failing on this PR label Apr 16, 2026
@jeremiedbb

Copy link
Copy Markdown
Member

Thanks for the PR @AshutoshDevpura. Please remove the changelog entry, it was added for the 1.7 release.

@DonSefi

DonSefi commented Apr 16, 2026 •

Copy link
Copy Markdown

Thanks for the PR! You mention:

Update docstring to reflect new default and add versionchanged note

I don't see that in the PR. Should there be something like:

.. versionchanged:: 1.9
The default value of quantile_method changed from "linear" to "averaged_inverted_cdf".

@AshutoshDevpura

Copy link
Copy Markdown
Contributor Author

Removed the change log and added the version changed note.

@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

@jeremiedbb
jeremiedbb enabled auto-merge (squash) April 17, 2026 10:58
@jeremiedbb
jeremiedbb merged commit 7b6d1bd into scikit-learn:main Apr 17, 2026
33 checks passed
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.

3 participants