bpfilter | R Documentation |
An implementation of the block particle filter algorithm of Rebeschini and van Handel (2015), which is used to estimate the filter distribution
of a spatiotemporal partially-observed Markov process.
bpfilter
requires a partition of the spatial units which can be provided by either the block_size
or the block_list
argument.
The elements of the partition are called blocks. We perform resampling for each block independently based on sample weights within the block.
Each resampled block only contains latent states for the spatial components within the block which allows for a “cross-pollination" of
particles where the highest weighted segments of each particle are more likely to be resampled and get combined with resampled components of
other particles. The method mitigates the curse of dimensionality by resampling locally.
## S4 method for signature 'missing'
bpfilter(object, ...)
## S4 method for signature 'ANY'
bpfilter(object, ...)
## S4 method for signature 'spatPomp'
bpfilter(
object,
Np,
block_size,
block_list,
save_states,
filter_traj,
...,
verbose = getOption("spatPomp_verbose", FALSE)
)
## S4 method for signature 'bpfilterd_spatPomp'
bpfilter(
object,
Np,
block_size,
block_list,
save_states,
filter_traj,
...,
verbose = getOption("spatPomp_verbose", FALSE)
)
object |
A |
... |
If a |
Np |
The number of particles used within each replicate for the adapted simulations. |
block_size |
The number of spatial units per block. If this is provided, the method subdivides units approximately evenly
into blocks with size |
block_list |
List that specifies an exact partition of the spatial units. Each partition element, or block, is an integer vector of neighboring units. |
save_states |
logical. If True, the state-vector for each particle and block is saved. |
filter_traj |
logical; if |
verbose |
logical; if |
Upon successful completion, bpfilter()
returns an object of class
‘bpfilterd_spatPomp’ containing the algorithmic parameters used to run bpfilter()
and the estimated likelihood.
Only one of block_size
or block_list
should be specified.
If both or neither is provided, an error is triggered.
The following methods are available for such an object:
logLik
yields an estimate of the log-likelihood of the data under the model.
Kidus Asfaw
2015
\asfaw2020
likelihood maximization algorithms: ienkf()
, igirf()
, iubf()
, ibpf()
Other likelihood evaluation algorithms:
abf()
,
abfir()
,
enkf()
,
girf()
# Complete examples are provided in the package tests
## Not run:
# Create a simulation of a Brownian motion
b <- bm(U=4, N=2)
# Run BPF with the specified number of units per block
bpfilterd_b1 <- bpfilter(b, Np = 10, block_size = 2)
# Run BPF with the specified partition
bpfilterd_b2 <- bpfilter(b,
Np = 10,
block_list = list(c(1,2),c(3,4)) )
# Get a likelihood estimate
logLik(bpfilterd_b2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.