sdm_spec_rand_forest {tidysdm}R Documentation

Model specification for a Random Forest for SDM

Description

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.

Usage

sdm_spec_rand_forest(..., tune = c("sdm", "all", "custom", "none"))

sdm_spec_rf(..., tune = c("sdm", "all", "custom", "none"))

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

Details

sdm_spec_rf() is simply a short form for sm_spec_rand_forest().

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
# combining tuning with specific values for other hyperparameters
sdm_spec_rf(tune = "sdm", trees = 100)

[Package tidysdm version 0.9.5 Index]