-
-
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
Seed value ignored? Reproducibility not given. #113
Comments
This is not random seed problem. This is because gblinear uses a multi-threading coordinate descent and with each thread eagerly update the parameter without sync with others for efficiency reason. This difference is due to running order of different threads. setting nthread=1 will disable the behavior. For gbtree, most updates are synced and usually there is no such behavior |
@jakob-r As explained, this was not problem of seed, but due to undermined behavior in multi-threading, I think this issue could be closed |
Don't think multi-threading is the error. Seeds were set below either by passing 'seed' param to xgb.train or by using R's set.seed() function. Independently verified (by extracting value of .Random.seed) after calling set.seed() that seed was indeed being changed (it was). nthread was set to 1 for both training/test runs with the same model parameters. Predicted probabilities appear below and are identical for two different seed values. Predicted probabilities (seed=1): Predicted probabilities (seed = 2): |
Can confirm seeing exact same behavior (with exact same parameter settings), though different predicted probabilities in Python version. Predicted probabilities (seed = 1): Predicted probabilities (seed = 2): |
[TRACKER] refactor tracker
I'm seeing this behavior as well on macOS, using nthread=1 and different values of seed, including seed=0, which according to the docs should disable a specific seed. The outputs from the engine are unchanged. Versions: |
We observed different behaviors depending on the OS.
Given this code:
On OSX this will be always true. Even if
seed1
andseed2
are different.On Linux this will be always false. Even if
seed1
andseed2
are the same.For Windows in test I made some time ago it seemed like it has the same behavior as OSX.
The text was updated successfully, but these errors were encountered: