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

[BUG]: StratifiedBootstrap can give the same sample on train and test set #254

Open
1 task done
fraimondo opened this issue Apr 4, 2024 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@fraimondo
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Here we can see when the random choice is made and then split into train/test.

bs_inds = np.random.choice(t_inds, len(t_inds), replace=True)
train.extend(bs_inds[:n_train])
test.extend(bs_inds[n_train:])

Expected Behavior

Basically, whatever gets chosen as test, should not be in the train.

This does not go with the Out of Bag Boostrap defitinion.

We should resample with repetition and whatever sample is not in the train set, is the test.

This can also allow us to implement the .632 and .632+ scoring correction methods.

Steps To Reproduce

latest julearn

Environment

not relevant

Relevant log output

No response

Anything else?

No response

@fraimondo fraimondo added the bug Something isn't working label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant