-
-
Notifications
You must be signed in to change notification settings - Fork 971
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
Use vectorization for categorical distance #5147
Merged
not522
merged 8 commits into
optuna:master
from
nabenabe0928:code-fix/use-vectorization-for-categorical-distance
Jan 9, 2024
Merged
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
3257fa2
Use vectorization for categorical distance
nabenabe0928 5d6e590
Reduce time complexity from O(C**2) to O(C*U)
nabenabe0928 3b9db5c
Debug by test cases
nabenabe0928 7112b9a
Fix a bug for observations.size == 0
nabenabe0928 c1fe437
Fix an error for consider_prior=True in the cat dist calc
nabenabe0928 d7e1dda
Apply the suggestions by wang-san
nabenabe0928 25ba574
Make len(observations)==0 early-return in categorical dist
nabenabe0928 f600cd8
Refactor slightly
nabenabe0928 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: the name
n_samples
might not be appropriate, because this includes prior. Mayben_mixture
may be better?