parallel_GBF_multiGaussian: Generalised Bayesian Fusion [parallel]

View source: R/multivariate_Gaussian_generalised_BF.R

parallel_GBF_multiGaussianR Documentation

Generalised Bayesian Fusion [parallel]

Description

Generalised Bayesian Fusion with bivariate Gaussian target

Usage

parallel_GBF_multiGaussian(
  particles_to_fuse,
  N,
  m,
  time_mesh,
  dim,
  mean_vecs,
  Sigmas,
  precondition_matrices,
  resampling_method = "multi",
  ESS_threshold = 0.5,
  sub_posterior_means = NULL,
  adaptive_mesh = FALSE,
  adaptive_mesh_parameters = NULL,
  diffusion_estimator = "Poisson",
  beta_NB = 10,
  gamma_NB_n_points = 2,
  seed = NULL,
  n_cores = parallel::detectCores()
)

Arguments

particles_to_fuse

list of length m, where particles_to_fuse[[c]] contains the particles for the c-th sub-posterior (a list of particles to fuse can be initialised by initialise_particle_sets() function)

N

number of samples

m

number of sub-posteriors to combine

time_mesh

time mesh used in Bayesian Fusion

dim

dimension

mean_vecs

list of length m, where mean_vecs[[c]] is a vector of length dim for the mean of sub-posterior c

Sigmas

list of length m, where Sigmas[[c]] is a dim x dim inverse covariance matrix for sub-posterior c

precondition_matrices

list of length m, where precondition_matrices[[c]] is the precondition matrix for sub-posterior c

resampling_method

method to be used in resampling, default is multinomial resampling ('multi'). Other choices are stratified resampling ('strat'), systematic resampling ('system'), residual resampling ('resid')

ESS_threshold

number between 0 and 1 defining the proportion of the number of samples that ESS needs to be lower than for resampling (i.e. resampling is carried out only when ESS < N*ESS_threshold)

sub_posterior_means

matrix with m rows and dim columns, where sub_posterior_means[c,] is the sub-posterior mean of sub-posterior c

adaptive_mesh

logical value to indicate if an adaptive mesh is used (default is FALSE)

adaptive_mesh_parameters

list of parameters used for adaptive mesh

diffusion_estimator

choice of unbiased estimator for the Exact Algorithm between "Poisson" (default) for Poisson estimator and "NB" for Negative Binomial estimator

beta_NB

beta parameter for Negative Binomial estimator (default 10)

gamma_NB_n_points

number of points used in the trapezoidal estimation of the integral found in the mean of the negative binomial estimator (default is 2)

seed

seed number - default is NULL, meaning there is no seed

n_cores

number of cores to use

Value

A list with components:

particles

particles returned from fusion sampler

proposed_samples

proposal samples from fusion sampler

time

run-time of fusion sampler

elapsed_time

elapsed time of each step of the algorithm

ESS

effective sample size of the particles after each step

CESS

conditional effective sample size of the particles after each step

resampled

boolean value to indicate if particles were resampled after each time step

E_nu_j

approximation of the average variation of the trajectories at each time step

chosen

which term was chosen if using an adaptive mesh at each time step

mesh_terms

the evaluated terms in deciding the mesh at each time step

precondition_matrices

list of length 2 where precondition_matrices[[2]] are the pre-conditioning matrices that were used and precondition_matrices[[1]] are the combined precondition matrices

sub_posterior_means

list of length 2, where sub_posterior_means[[2]] are the sub-posterior means that were used and sub_posterior_means[[1]] are the combined sub-posterior means


rchan26/hierarchicalFusion documentation built on Sept. 11, 2022, 10:30 p.m.