-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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 reproduce results from training with xgboost #7631
Comments
Are you sure that it's xgboost not being deterministic? From the snippet, you have used a mix of libraries.
Could you please provide a reproducible example that we can run?
XGBoost has the |
What is the seed used for though ? I have set both seed and random_state but am wondering what difference is |
xgboost/python-package/xgboost/sklearn.py Line 610 in 34a238c
|
Since you are not using any sampling, it's not relevant to the non-deterministic issue here. |
Would be great if you can try our nighly build: https://xgboost.readthedocs.io/en/stable/install.html#id1 we avoided some non-deterministic behaviour in evaluation caused by floating-point summation: #7303 |
Hi thanks for this - i realised the problem isn't with xgboost but how my data is being read randomly |
Hi,
I have the following steps below to train an xgboost classifier.
Each time i run the above, i get a different set of bestparams after grid search and slightly different accuracies, and predictions..... How is this happening when i use random_state for each of below:
for SelectKBest i also use 'all' features for now. But i am confused as to how i got different results on each run i did. FYI hyperclassufuer search is just a wrapper around gridsearch.
Any ideas on why this could be happening based on above?
I have tried setting tree_method = 'exact' i still get different results. I have also tried setting 'seed'? Why does this still exist when i t was deprecated.
How can i get reproducible results?
XGBOOST version is: 1.5.0.
The text was updated successfully, but these errors were encountered: