compiling under `apple-clang` makes GCV test fail with stochastic approximation
Closed this issue · 1 comments
AlePalu commented
Compiling the code under apple-clang
, makes any test involving a stochastic approximation of the edf to fail. Possibly related to the way apple-clang
sets the seed for the RNG.
AlePalu commented
Solved in d999940. Problem was in the usage of std::default_random_engine
, which according to the C++ standard its definition is implementation-defined (see, e.g., here).
Solved by fixing the type of RNG to a 32-bit Mersenne Twister pseudo-random number generator (std::mt19937
), which works the same on all platforms and compilers.