Skip to contents

Split datacube into sub-rasters, fit model 0.x's, and stitch together. Divide-and-conquer.

Usage

tj_fit_m0.x(
  x,
  timevar = "year",
  attrvar = "values",
  tiling,
  cfg,
  ...,
  ncores = 1,
  verbose = TRUE,
  verbose2 = verbose,
  fitpath = NULL,
  fitid = "youridhere",
  keep_all_in_memory = TRUE,
  model_variant = "m0.3",
  recalc = FALSE
)

Arguments

x

stars datacube

tiling

given by [tj_divide_raster()]

cfg

m0.x parameters, see [tj_cfg_m0.3(), tj_cfg_m0.6()]

...

parameters passed on to [tj_fit_m0.3(), tj_fit_m0.6()] (in case cfg not used)

cores

number of cores to use in multicore computation using `doParallel`

Value

List of fits (keep_all_in_memory=TRUE) or list of files where the fits are stored (fitpath provided). Note: The fits have cell_info element where the 'truecell' column provides the mapping to the original 'x'.

Details

Wrap fitting of m0.x in subsets for multicore computation. The tiling splits the stars-object into subrasters, then [tj_fit_m0.3(), tj_fit_m0.6()] is called on each subraster.

See also

[tj_cfg_m0.3(), tj_cfg_m0.6()]