Closed rdbuf closed 4 years ago
Hey @rdbuf !
Your training doesn't involve any random process. That's why results are identical.
Also, below are some comments about the usage of seeds.
Firstly, you shouldn't use all aliases. Use only one of them. You can see a corresponding warning in the training logs:
[LightGBM] [Warning] seed is set with random_seed=4, random_state=4 will be ignored. Current value: seed=4
Secondly, you don't need to specify all concrete seeds if you set the general seed and vice versa. Refer to the parameter's description:
this seed is used to generate other seeds, e.g.
data_random_seed
,feature_fraction_seed
, etc. https://lightgbm.readthedocs.io/en/latest/Parameters.html#seed
Thirdly, it is better to pass data_random_seed
to Dataset
parameters.
Lastly, introduce some randomness via your training params and see expected output:
...
params = dict(
boosting_type=engine,
# I've set all the parameters related to randomness I could find,
# just in case, but it didn't help:
seed=seed,
feature_fraction=0.7
)
...
Thank you so much @StrikerRUS! It is a lot more clear now what's going on. The issue can now be closed, I believe.
Environment info
Operating System:
CPU/GPU model:
C++/Python/R version:
Python 3.7.3
LightGBM version or commit hash:
2.3.1
Error description
Setting
seed
on LGBM withboosting_type='gbdt'
takes no effect. The output of the model is always the same.For other boosting_types, it works.
Reproducible examples
Steps to reproduce
False
,False
.True
,False
.