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 kfold_split_stratified() when a group has 1 observation #278

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

jgabry
Copy link
Member

@jgabry jgabry commented Oct 10, 2024

fixes #277

Fixes issue with kfold_split_stratified when a group has a single observation. This is due to the different behavior of sample() when the input has length 1, as pointed out by @helske.

@jgabry jgabry merged commit ec687ff into master Oct 10, 2024
6 checks passed
@jgabry jgabry deleted the fix-kfold_split_stratified-1-obs branch October 10, 2024 23: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.

kfold_split_stratified produces incorrect results if any of the groups consists of only one element
1 participant