grf package options can be set using R's options command.
The current available options are:
`grf.verbose`: controls whether information is printed during training. The default value is `FALSE`.
`grf.legacy.seed`: controls whether grf's random seed behavior depends on the number of CPU threads used to train the forest. The default value is `FALSE`. Set to `TRUE` to recover results produced with grf versions prior to 2.4.0.
grf_options()
Prints the current grf package options.
# \donttest{ # Enable progress output during training. options(grf.verbose = TRUE) n <- 1500 p <- 10 X <- matrix(rnorm(n * p), n, p) Y <- X[, 1] * rnorm(n) r.forest <- regression_forest(X, Y)#> training [regression]: 0%| | 0/2000 [00:00:00<?, ?it/s] training [regression]: 0%| | 0/2000 [00:00:00<?, ?it/s] training [regression]: 0%| | 0/2000 [00:00:00<?, ?it/s] training [regression]: 0%| | 0/2000 [00:00:00<?, ?it/s] training [regression]: 7%|█ | 144/2000 [00:00:00<00:00:01, 1367.83it/s] training [regression]: 14%|█ | 290/2000 [00:00:00<00:00:01, 1410.73it/s] training [regression]: 22%|██ | 432/2000 [00:00:00<00:00:01, 1410.29it/s] training [regression]: 29%|███ | 574/2000 [00:00:00<00:00:01, 1412.31it/s] training [regression]: 36%|████ | 718/2000 [00:00:00<00:00:00, 1417.39it/s] training [regression]: 43%|████ | 864/2000 [00:00:00<00:00:00, 1422.64it/s] training [regression]: 50%|█████ | 1008/2000 [00:00:00<00:00:00, 1423.45it/s] training [regression]: 58%|██████ | 1152/2000 [00:00:00<00:00:00, 1424.63it/s] training [regression]: 65%|██████ | 1298/2000 [00:00:00<00:00:00, 1427.98it/s] training [regression]: 72%|███████ | 1444/2000 [00:00:01<00:00:00, 1430.03it/s] training [regression]: 79%|████████ | 1588/2000 [00:00:01<00:00:00, 1430.57it/s] training [regression]: 86%|█████████ | 1730/2000 [00:00:01<00:00:00, 1428.76it/s] training [regression]: 94%|█████████ | 1876/2000 [00:00:01<00:00:00, 1429.98it/s] training [regression]: 100%|██████████| 2000/2000 [00:00:01<00:00:00, 1419.69it/s]#> grf.verbose grf.legacy.seed #> FALSE FALSE