dmlc / XGBoost.jl

XGBoost Julia Package
Other
289 stars 110 forks source link

Generate random indics using local seed rather global seed in cv #93

Closed A-LOST-WAPITI closed 3 years ago

A-LOST-WAPITI commented 3 years ago

Hello

Recantly I get puzzled on getting same random numbers when I was using nfold_cv to testify parameters. After reading the source code of that function, I don't think it's proper to change the global random seed.

So I have done some changes on the source code to fix that problem.

  1. remove the importing of Random:seed!
  2. import Random:MersenneTwister as seed generator
  3. generate randidx using local seed without changing global seed