View source: R/confidence_map.R
confidence_map | R Documentation |
Create confidence maps using bootstrap replicates
confidence_map(model, ...) ## S3 method for class 'train' confidence_map( model, rasterStack, nrep = 10, doclamp = FALSE, progress = TRUE, ... ) ## S3 method for class 'list' confidence_map( model, rasterStack, nrep = 10, doclamp = FALSE, progress = TRUE, ... ) ## S3 method for class 'ensemble.train' confidence_map( model, rasterStack, nrep = 10, doclamp = FALSE, progress = TRUE, return.all = FALSE, ... )
model |
A model returned by |
... |
ignored |
rasterStack |
A RasterStack from the |
nrep |
Number of bootstrap replicates. |
doclamp |
logical. Clamp |
progress |
logical. Show progress text? If parallel is activated, it automatically defaults to |
return.all |
logical. If |
For each interaction (defined by nrep), the trained data set for each model is resampled (bootstrap)
and each model retrained using this new data.
Predictions are made for each model for each interaction, separately.
For 'train' objects, the mean and standard deviation from all replicates are returned.
For 'ensemble.train' objects, the coefficient of variation is calculated for each model, which in turn is assembled based on algorithmic used to create the ensemble:
mean, weighted_mean -> | ![]() |
median, number_votes -> | ![]() |
Where cvi =
mean coefficient of variation for model i
,
pi =
predictions for model i
using all training data,
wi =
weight of model i
,
and p =
predictions of the ensemble using all training data.
For weighted_mean
, wi = metric/sum(all metrics)
;
and for mean
, wi = 1/(number of models)
.
For 'train' or 'list' methods, a 'RasterLayer' or a 'RasterStack' containing the coefficient of variation
(CV) of the bootstrap output for each model.
For 'ensemble.train' method, if return.all
is TRUE
, return a list with $preds
and $cvs
containing each a 'RasterStack' of the predictions and CVs of all models,
including the ensemble. Else, return a single 'RasterLayer' with CV of the ensemble model.
When using progress = TRUE
in parallel, you must make clusters using the doSNOW
package.
Using package doParallel
will return a warning, and the progress bar will not be updated.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.