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

Unable to set random_state without setting shuffle=True #29

Open
raahilshah opened this issue Apr 27, 2023 · 0 comments
Open

Unable to set random_state without setting shuffle=True #29

raahilshah opened this issue Apr 27, 2023 · 0 comments

Comments

@raahilshah
Copy link

Despite documentation suggesting that since randomness is applied not just on shuffle, that this use case is intended, but doesn't seem to work:

    cv = MultilabelStratifiedKFold(cv, random_state=RANDOM_STATE)
  File "/Users/raahilshah/opt/anaconda3/envs/storm/lib/python3.8/site-packages/iterstrat/ml_stratifiers.py", line 157, in __init__
    super(MultilabelStratifiedKFold, self).__init__(n_splits=n_splits, shuffle=shuffle, random_state=random_state)
  File "/Users/raahilshah/opt/anaconda3/envs/storm/lib/python3.8/site-packages/sklearn/model_selection/_split.py", line 296, in __init__
    raise ValueError(
ValueError: Setting a random_state has no effect since shuffle is False. You should leave random_state to its default (None), or set shuffle=True.
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

No branches or pull requests

1 participant