GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [32161] Added sorting by freqyency in the OrdinalEncoder by vulkomilev · Pull Request #35355 · scikit-learn/scikit-learn

Conversation

@vulkomilev

@vulkomilev vulkomilev commented Nov 9, 2026

Copy link
Copy Markdown

This pr add the option for sorting by frequency in the OrdinalEncoder .
The sorting is done with the most encountered element being labeled 0 the second most encountered 1 and so on.This uses np.lexsort to do the sorting.If there are max_categories used the sorting is cut to the most often used categories.If there are some ties in the counts a second lexicographical order is used.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
vulkomilev added 11 commits July 26, 2026 20:07
@vulkomilev
added frequency option for ordinal encoder according to 32161
30ef7d5
@vulkomilev
fixed some formating
1240f9b
@vulkomilev
Merge branch 'main' into 32161
0a840bb
@vulkomilev
problematic version but solves one problem with the frequency encoding
b0930f2
@vulkomilev
swapped the argsort with _map_to_integer so the logic with frequency …
31273b7
…sort will work .Other test are not failing
@vulkomilev
fixed lint
88f1fa5
@vulkomilev
some fixes
eb71fc2
@vulkomilev
updated the encoder
33f8c79
@vulkomilev
updated the encoder
647bb15
@vulkomilev
added some fixes
25c6486
@vulkomilev
adjusted acoring to lint
b53d108
@github-actions github-actions Bot added module:preprocessing module:utils size/M labels Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

Thank you for opening your first pull request to scikit-learn! 🎉

To help get your contribution reviewed, please make sure that:

  • You have filled out the pull request template.

  • The pull request addresses an existing issue that is ready for contribution (e.g. not tagged as 'Needs Triage', 'Needs Decision', ...). If you are proposing a new feature, please open an issue to discuss it first.

  • There are no other open pull requests already targeting the same issue.

  • You have followed the pull request checklist. In particular, linting and tests should pass.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vulkomilev vulkomilev changed the title [32161] [32161] Added sorting by freqyency in the OrdinalEncoder Nov 9, 2026
vulkomilev added 3 commits November 9, 2026 12:30
@vulkomilev
some fixed related to sorting
8a4e7fb
@vulkomilev
some fixed related to sorting
9627f49
@vulkomilev
some fixed related to sorting
b9c4939
@adam2392
adam2392 self-requested a review November 11, 2026 23:38

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@adam2392 adam2392 Awaiting requested review from adam2392

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

module:preprocessing module:utils size/M

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@vulkomilev
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.