create_nonlinear_map: Create a mapping to effect a non-linear transformation

View source: R/map_nonlinear.R

create_nonlinear_mapR Documentation

Create a mapping to effect a non-linear transformation

Description

Creates a mapping that transforms the values at the source indices by a predefined non-linear transformation and outpts them at the target indices. Supported transformations at present are exp, relu and limiter.

Usage

create_nonlinear_map()

Details

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

mapname Name of the mapping
maptype Must be "nonlinear_map"
src_idx Vector of source indices
tar_idx Vector of target indices. Must be of same length as src_idx
funname A string specifying the non-linear transformation. Can be "exp", "relu" or "limiter".
minvalue If funname = "limiter", the lower cut-off limit.
maxvalue If funname = "limiter", the upper cut-off limit.

Value

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

See Also

Other mappings: create_compound_map(), 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_normerr_map(), create_product_map()

Examples

params <- list(
  mapname = "mynonlinearmap",
  maptype = "nonlinear_map",
  src_idx = 1:3,
  tar_idx = 4:6,
  funname = "relu"
)
mymap <- create_nonlinear_map()
mymap$setup(params)
x <- c(1,-2,3,0,0,0)
mymap$propagate(x)
mymap$jacobian(x)


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