grf-labs / grf

Generalized Random Forests
https://grf-labs.github.io/grf/
GNU General Public License v3.0
957 stars 250 forks source link

Make seed independent of num.threads and add legacy option #1447

Closed erikcs closed 1 week ago

erikcs commented 1 week ago

This PR makes the random seed argument produce the same results irrespective of what num.threads is set to. In order to reproduce past results, a global package option options(grf.legacy.seed) is added which can be set to TRUE to revert back to the old behavior where seed and num.threads interacts.

1368.

erikcs commented 1 week ago

Yes it adds complexity, but that's the price we have to pay in order to do this imo! Past versions of GRF are not available as CRAN binaries and have to be installed from source, which unfortunately can be challenging for many users.

(there's a bunch of unrelated commits below because I got a new arm mac that evidently produces slightly different results for characterization tests stored on the repo using x86-based systems)