Skip to content

Fix kfold_split_stratified() when a group has 1 observation#278

Merged
jgabry merged 1 commit intomasterfrom
fix-kfold_split_stratified-1-obs
Oct 10, 2024
Merged

Fix kfold_split_stratified() when a group has 1 observation#278
jgabry merged 1 commit intomasterfrom
fix-kfold_split_stratified-1-obs

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.

fixes #277

Co-Authored-By: Jouni Helske <jouni.helske@iki.fi>
@jgabry jgabry merged commit ec687ff into master Oct 10, 2024
@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