bpfilter: Block particle filter (BPF)

bpfilterR Documentation

Block particle filter (BPF)

Description

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.

Usage

## 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("verbose", FALSE)
)

## S4 method for signature 'bpfilterd_spatPomp'
bpfilter(
  object,
  Np,
  block_size,
  block_list,
  save_states,
  filter_traj,
  ...,
  verbose = getOption("verbose", FALSE)
)

Arguments

object

A spatPomp object.

...

If a params argument is specified, bpfilter will estimate the likelihood at that parameter set instead of at coef(object).

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_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 TRUE, a filtered trajectory is returned for the state variables and parameters.

verbose

logical; if TRUE, messages updating the user on progress will be printed to the console.

Value

Upon successful completion, bpfilter() returns an object of class ‘bpfilterd_spatPomp’ containing the algorithmic parameters used to run bpfilter() and the estimated likelihood.

Details

Only one of block_size or block_list should be specified. If both or neither is provided, an error is triggered.

Methods

The following methods are available for such an object:

logLik

yields an estimate of the log-likelihood of the data under the model.

Author(s)

Kidus Asfaw

References

\rebeschini

2015

\asfaw

2020

See Also

likelihood maximization algorithms: ienkf(), igirf(), iubf(), ibpf()

Other likelihood evaluation algorithms: abf(), abfir(), enkf(), girf()

Examples

# 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)


kidusasfaw/spatPomp documentation built on Feb. 20, 2024, 7:01 p.m.