harrysouthworth / gbm

Gradient boosted models
Other
106 stars 27 forks source link

Unreproducible output from gbm #39

Closed harrysouthworth closed 9 years ago

harrysouthworth commented 9 years ago

set.seed(20150312) wh <- gbm(Species ~ ., data=iris, cv.folds=3) ri1 <- relative.influence(wh)

Do it again

set.seed(20150312) wh <- gbm(Species ~ ., data=iris, cv.folds=3) ri2 <- relative.influence(wh)

Results differ

ri1 ri2

std::random_shuffle(colNumbers.begin(), colNumbers.end()) ;

apparently due to that line (277 in tree.cpp)

with many thanks to Paul Metcalfe

pdmetcalfe commented 9 years ago

If I were to send a patch, could I switch it all to c++11?

The shuffle / random_shuffle stuff changes at c++11...

http://stackoverflow.com/questions/22600100/why-are-stdshuffle-methods-being-deprecated-in-c14

harrysouthworth commented 9 years ago

I'm a total n00b at C++ so am not qualified to comment. In my simplistic opinion, if it works, it works.

pdmetcalfe commented 9 years ago

Closed in gbm-developers/gbm#2