Model specification for a Random Forest for SDM
Source:R/sdm_spec_rand_forest.R
sdm_spec_rand_forest.Rd
This function returns a parsnip::model_spec for a Random Forest to
be used as a classifier of presences and absences in Species Distribution
Models. It uses the library ranger
to fit boosted trees; to use another
library, simply build the
parsnip::model_spec directly.
Arguments
- ...
parameters to be passed to
parsnip::rand_forest()
to customise the model. See the help of that function for details.- tune
character defining the tuning strategy. Valid strategies are:
"sdm" chooses hyperparameters that are most important to tune for an sdm (for rf, 'mtry')
"all" tunes all hyperparameters (for rf, 'mtry', 'trees' and 'min')
"custom" passes the options from '...'
"none" does not tune any hyperparameter
Value
a parsnip::model_spec of the model.
See also
Other "sdm model specifications":
sdm_spec_boost_tree()
,
sdm_spec_gam()
,
sdm_spec_glm()
,
sdm_spec_maxent()
Examples
test_rf_spec <- sdm_spec_rf(tune = "sdm")
test_rf_spec
#> Random Forest Model Specification (classification)
#>
#> Main Arguments:
#> mtry = tune()
#>
#> Computational engine: ranger
#>
# combining tuning with specific values for other hyperparameters
sdm_spec_rf(tune = "sdm", trees = 100)
#> Random Forest Model Specification (classification)
#>
#> Main Arguments:
#> mtry = tune()
#> trees = 100
#>
#> Computational engine: ranger
#>