View source: R/run_ml_models.R
run_regression_submodels | R Documentation |
Wrapper to run many regression sub-models using the caret package
run_regression_submodels(
input_data,
id_raster,
covariates,
cv_settings,
model_settings,
family = "binomial",
clamping = TRUE,
use_admin_bounds = FALSE,
admin_bounds = NULL,
admin_bounds_id = "polygon_id",
prediction_range = c(-Inf, Inf),
verbose = TRUE
)
input_data |
A data.frame with at least the following columns:
|
id_raster |
terra::SpatRaster with non-NA pixels delineating the extent of the study area |
covariates |
(list) Named list of all covariate effects included in the model,
typically generated by |
cv_settings |
Named list of cross-validation settings, passed to caret::trainControl. |
model_settings |
Named list where the name of each header corresponds to a model run in caret::train, and the arguments correspond to the model-specific settings for that model type. |
family |
( |
clamping |
( |
use_admin_bounds |
( |
admin_bounds |
(sf, default NULL) Administrative boundaries to use.
Only considered if |
admin_bounds_id |
( |
prediction_range |
( |
verbose |
( |
List with two items:
"models": A list containing summary objects for each regression model
"predictions": Model predictions covering the entire id_raster
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.