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

[fix] fix Sample when sampling only one element (fix #4134) #4324

Merged
merged 1 commit into from
Jun 18, 2021

Conversation

shiyu1994
Copy link
Collaborator

This is to fix #4134. Currently, when K=1, it is impossible for the Sample function to sample the last element. Add a separate case for K=1.

Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change makes sense to me! I read through all of https://github.com/shiyu1994/LightGBM/blob/fix-4134/include/LightGBM/utils/random.h and think I have a good understanding of this fix and enough C++/C knowledge to approve.

But I won't merge, in case you want another reviewer to also look.

@jameslamb
Copy link
Collaborator

@shiyu1994 do you want an additional review, or can this be merged?

@shiyu1994
Copy link
Collaborator Author

@jameslamb Sorry for the late response. I was busy with some developing work in the past few weeks. I think we can merge this.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

One Feature per Tree
2 participants