Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make kNN more resilient to nominal data #1566

Closed
wants to merge 1 commit into from

Conversation

e10e3
Copy link
Contributor

@e10e3 e10e3 commented Jul 5, 2024

Fixes #1565 by using a different formula for the difference when the data is not numeric.

This allows the distance not to error out when non-numbers are given, while keeping a reasonable behaviour.

Caveat

Because of the added code paths that are difficult to optimise away, kNN is roughly twice as slow to make a prediction.

This allows the distance not to error out when non-numbers are given, while keeping a reasonable behaviour.
@smastelini
Copy link
Member

Please, see my comments on #1565.

@e10e3 e10e3 closed this Jul 5, 2024
@e10e3 e10e3 deleted the knn-string-features branch July 23, 2024 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kNN causes an error when the input has nominal data
2 participants