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

Setting a random_state has no effect since shuffle is False #2

Open
Quaterion opened this issue Feb 23, 2021 · 0 comments
Open

Setting a random_state has no effect since shuffle is False #2

Quaterion opened this issue Feb 23, 2021 · 0 comments

Comments

@Quaterion
Copy link

I try to run the sample code from the readme but get an error message:

# load libraries
from nestedhyperboost import xgboost
from sklearn import datasets
import pandas

# load data
data_sklearn = datasets.load_iris()
data = pandas.DataFrame(data_sklearn.data, columns = data_sklearn.feature_names)
data['target'] = pandas.Series(data_sklearn.target)

# conduct nestedhyperboost
results = xgboost.xgb_ncv_classifier(
    data = data,
    y = 'target',
    k_inner = 5,
    k_outer = 5,
    n_evals = 10
)

  0%|          | 0/10 [00:00<?, ?trial/s, best loss=?]job exception: Setting a random_state has no effect since shuffle is False. You should leave random_state to its default (None), or set shuffle=True.

[...]


  File "C:\\Miniconda3\lib\site-packages\sklearn\model_selection\_split.py", line 290, 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.

Versions:
version('nestedhyperboost')
'0.0.3'
version('pandas')
'1.2.0'
version('sklearn')
'0.0'

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