create_compound_map: Create a compound mapping

View source: R/map_compound.R

create_compound_mapR Documentation

Create a compound mapping

Description

Create a compound mapping by merging the effect of individual mappings.

Usage

create_compound_map()

Details

The following fields are required in the parameter list to initialize the mapping:

mapname Name of the mapping
maptype Must be "compound_map"
maps a list with the parameter lists of the individual maps

This mapping will also take care of the correct ordering of the individual mappings. Bundling together individual mapping specifications to a compound map is the last step before doing Bayesian inference.

Value

Returns a list of functions to operate with the mapping, see create_maptype_map.

See Also

Other mappings: create_convolution_with_xtrafo_map(), create_derivative2nd_map(), create_derivative_map(), create_linearinterpol_map(), create_linearinterpol_with_xtrafo_map(), create_linearmap_map(), create_maptype_map(), create_map(), create_nonlinear_map(), create_normerr_map(), create_product_map()

Examples

params1 <- list(
  mapname = "mymap1",
  maptype = "linearinterpol_map",
  src_idx = 1:3,
  tar_idx = 7:8,
  src_x = 1:3,
  tar_x = 2:3
)
params2 <- list(
  mapname = "mymap2",
  maptype = "linearinterpol_map",
  src_idx = 4:6,
  tar_idx = 7:8,
  src_x = 1:3,
  tar_x = 2:3
)
compmap_params <- list(
  mapname = "mycompmap",
  maptype = "compound_map",
  maps = list(params1, params2)
)
mycompmap <- create_compound_map()
mycompmap$setup(compmap_params)
x <- c(1,2,3,5,5,5,0,0)
mycompmap$propagate(x)
mycompmap$jacobian(x)



gschnabel/nucdataBaynet documentation built on Feb. 3, 2023, 4:13 a.m.