bru_mapper_taylor {inlabru} | R Documentation |
Mapper for linear Taylor approximations
Description
Provides a pre-computed affine mapping,
internally used to represent and evaluate linearisation information.
The state0
information indicates for which state the offset
was evaluated;
The affine mapper output is defined as
effect(state) = offset + jacobian %*% (state - state0)
Usage
bru_mapper_taylor(
offset = NULL,
jacobian = NULL,
state0 = NULL,
values_mapper = NULL
)
## S3 method for class 'bru_mapper_taylor'
ibm_n(mapper, inla_f = FALSE, multi = FALSE, ...)
## S3 method for class 'bru_mapper_taylor'
ibm_n_output(mapper, input, ...)
## S3 method for class 'bru_mapper_taylor'
ibm_values(mapper, inla_f = FALSE, multi = FALSE, ...)
## S3 method for class 'bru_mapper_taylor'
ibm_jacobian(mapper, ..., multi = FALSE)
## S3 method for class 'bru_mapper_taylor'
ibm_eval(mapper, input = NULL, state = NULL, ...)
Arguments
offset |
For |
jacobian |
For |
state0 |
For |
values_mapper |
mapper object to be used for |
mapper |
A mapper S3 object, inheriting from |
inla_f |
logical; when |
multi |
logical;
If |
... |
Arguments passed on to other methods |
input |
Data input for the mapper. |
state |
A vector of latent state values for the mapping,
of length |
Details
The
ibm_eval.bru_mapper_taylor()
evaluates linearised mapper information at the givenstate
. Theinput
argument is ignored, so that the usual argument orderibm_eval(mapper, input, state)
syntax can be used, but alsoibm_eval(mapper, state = state)
. For a mapper with a named jacobian list, thestate
argument must also be a named list. Ifstate
isNULL
, all-zero is assumed.
See Also
bru_mapper, bru_mapper_generics
Other mappers:
bru_get_mapper()
,
bru_mapper()
,
bru_mapper.fm_mesh_1d()
,
bru_mapper.fm_mesh_2d()
,
bru_mapper_aggregate()
,
bru_mapper_collect()
,
bru_mapper_const()
,
bru_mapper_factor()
,
bru_mapper_generics
,
bru_mapper_harmonics()
,
bru_mapper_index()
,
bru_mapper_linear()
,
bru_mapper_logsumexp()
,
bru_mapper_marginal()
,
bru_mapper_matrix()
,
bru_mapper_mesh_B()
,
bru_mapper_multi()
,
bru_mapper_pipe()
,
bru_mapper_scale()
,
bru_mapper_shift()
Examples
m <- bru_mapper_taylor(
offset = rep(2, 3),
jacobian = matrix(1:6, 3, 2),
state0 = c(1, 2)
)
ibm_eval2(m, state = 2:3)