View source: R/map_nonlinear.R
create_nonlinear_map | R Documentation |
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.
create_nonlinear_map()
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.
|
Returns a list of functions to operate with the mapping, see create_maptype_map
.
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()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.