validate_RF | R Documentation |
Compute accuracy metrics on test set for RF
validate_RF( formula, data, rep = 10, Ncpu = 1, spatial = FALSE, seed = 123, method = "CV", return_fit = TRUE, ... )
formula |
a model formula used to fit the data |
data |
the full dataset |
rep |
the number of cross validation replicates (default = 10) |
Ncpu |
the number of CPU cores to be used (default = 1) |
spatial |
either FALSE (default), or TRUE (to use matrix of distances as predictor) |
seed |
the seed used to control the reproducibility of the cross validation |
method |
either "CV" for cross-validation or "OOB" for directly using the out-of-bag observations generated when growing the forest |
return_fit |
whether to return the fit on all the data as attribute (default = FALSE) |
... |
additional parameters to be passed to |
a tibble with the CV/OOB replicates in row and accuracy metrics in columns
compute_metrics()
for details on the function computing the values outputted here
validate_RF(staff_rangers_log ~ PA_area_log, data = data_test, method = "CV") validate_RF(staff_rangers_log ~ PA_area_log, data = data_test, rep = 1, num.trees = 10, method = "OOB")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.