| ibm_as_taylor | R Documentation |
Implementations must return a bm_taylor object
The linearisation information includes offset, jacobian, and state0.
The state information indicates for which state the offset was evaluated,
with NULL meaning all-zero.
The linearised mapper output is defined as
effect(input, state) = offset(input, state0) + jacobian(input, state0) %*% (state - state0)
The default method calls ibm_eval2() to generate
the needed information.
ibm_as_taylor(mapper, input, state = NULL, ...)
## Default S3 method:
ibm_as_taylor(mapper, input, state, ...)
## S3 method for class 'bm_multi'
ibm_as_taylor(mapper, input, state, inla_f = FALSE, ...)
## S3 method for class 'bm_collect'
ibm_as_taylor(mapper, input, state, inla_f = FALSE, ...)
## S3 method for class 'bm_expr'
ibm_as_taylor(
mapper,
input,
state,
...,
derived = NULL,
jacobians = NULL,
data = data,
inla_f = FALSE
)
## S3 method for class 'bru_obs'
ibm_as_taylor(mapper, input, state, ..., multi = FALSE, comp_mappers)
## S3 method for class 'bru_obs_list'
ibm_as_taylor(
mapper,
input,
state,
...,
multi = FALSE,
comp_mappers,
eval_fun = NULL
)
## S3 method for class 'bm_repeat'
ibm_as_taylor(mapper, input, state, ...)
## S3 method for class 'bm_sum'
ibm_as_taylor(mapper, input, state, ...)
## S3 method for class 'bru_comp'
ibm_as_taylor(mapper, input, state = NULL, ...)
mapper |
A mapper S3 object, inheriting from |
input |
Data input for the mapper. |
state |
A vector of latent state values for the mapping,
of length |
... |
Arguments passed on to other methods |
inla_f |
logical; when |
derived |
The state vectors of variables derived from the root
variables. If |
jacobians |
The state vectors of variables derived from the root
If |
data |
should be a list with data objects, with the main object called
|
multi |
logical;
If |
comp_mappers |
A list of mappers, typically from
|
eval_fun |
A list of functions, typically from
|
A bm_taylor object.
The state0 information in the affine mapper indicates for which state
the offset was evaluated; The affine mapper output is defined as
effect(input, state) = offset(input, state0) + jacobian(input, state0) %*% (state - state0)
ibm_as_taylor(default): Calls ibm_eval2() and returns a bm_taylor object.
Other mapper methods:
bru_mapper_generics,
ibm_eval(),
ibm_eval2(),
ibm_inla_subset(),
ibm_invalid_output(),
ibm_is_linear(),
ibm_is_rowwise(),
ibm_jacobian(),
ibm_n(),
ibm_n_output(),
ibm_names(),
ibm_simplify(),
ibm_values()
m <- bm_linear()
ibm_as_taylor(m, input = c(1, 3, 4, 5, 2), state = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.