dissever: Spatial downscaling

Description Usage Arguments Author(s) References Examples

Description

Performs spatial downscaling of coarse grid mapping to fine grid mapping using predictive covariates and a model fitted using the caret package.

Usage

1
2
3
4
5
6
7
## S4 method for signature 'RasterLayer,RasterLayer'
dissever(coarse, fine, method = "rf",
  p = 0.5, nmax = NULL, thresh = 0.01, min_iter = 5, max_iter = 20,
  boot = NULL, level = 0.9, tune_length = 3,
  tune_grid = .create_tune_grid(model = method, tune_length = tune_length),
  train_control_init = .default_control_init,
  train_control_iter = .default_control_iter, verbose = FALSE)

Arguments

coarse

object of class "RasterLayer", the coarse-resolution layer that needs to be downscaled

fine

object of class "RasterStack", the fine-resolution stack of predictive covariates

method

a string specifying which classification or regression model to use (via the caret package). Possible values are found using names(caret::getModelInfo()).

p

numeric, proportion of the fine map that is sampled for fitting the dissever model (between 0 and 1, defaults to 0.5)

nmax

numeric maximum number of pixels selected for fitting the dissever model. It will override the number of pixels chosen by the p option if that number is over the value passed to nmax.

thresh

numeric, dissever iterations will proceed until the RMSE of the dissever model reaches this value, or until the maximum number of iterations is met (defaults to 0.01)

min_iter

numeric, minimum number of iterations (defaults to 5)

max_iter

numeric, maximum number of iterations (defaults to 20)

boot

numeric, if not NULL (default), the number of bootstrap replicates used to derive the confidence intervals.

level

If this is a numeric value, it is used to derive confidence intervals using quantiles. If it is a function, it is used to derive the uncertainty using this function.

tune_length

numeric, the number of parameters to test to find the optimal parametrisation of the caret model (defaults to 3)

tune_grid

a data frame with possible tuning values

train_control_init

Control parameters for finding the optimal parameters of the caret model (see trainControl)

train_control_iter

Control parameters for fitting the caret model during the iteration phase (see trainControl)

verbose

controls the verbosity of the output (TRUE or FALSE)

Author(s)

Brendan Malone, Pierre Roudier

References

Malone, B.P, McBratney, A.B., Minasny, B., Wheeler, I., (2011) A general method for downscaling earth resource information. Computers & Geosciences, 41: 119-125. http://dx.doi.org/10.1016/j.cageo.2011.08.021

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Load the Edgeroi dataset (see ?edgeroi)
data(edgeroi)

# Plot the Edgeroi dataset (using the raster package)
library(raster)
plot(edgeroi$carbon) # coarse resolution layer
plot(edgeroi$predictors) # fine resolution predictors

# Run dissever using a simple linear model.

# In this instance we are subsampling heavily (p = 0.05) to keep
# run time short
res_lm <- dissever(
  coarse = edgeroi$carbon,
  fine = edgeroi$predictors,
  method = "lm",
  min_iter = 5, max_iter = 10,
  p = 0.05
)

# A lot more models are available through caret:
## Not run: 
subset(caret::modelLookup(), forReg == TRUE, select = 'model')

## End(Not run)

# Plot dissever results
plot(res_lm, type = 'map', main = "Dissever using GAM")
plot(res_lm, type = 'perf', main = "Dissever using GAM")

pierreroudier/dissever documentation built on June 14, 2020, 12:05 p.m.