parallel_fusion_SMC_biGaussian: Generalised Monte Carlo Fusion [parallel]

View source: R/bivariate_Gaussian_fusion.R

parallel_fusion_SMC_biGaussianR Documentation

Generalised Monte Carlo Fusion [parallel]

Description

Generalised Monte Carlo Fusion with bivariate Gaussian target

Usage

parallel_fusion_SMC_biGaussian(
  particles_to_fuse,
  N,
  m,
  time,
  mean_vec,
  sd_vec,
  corr,
  betas,
  precondition_matrices,
  resampling_method = "multi",
  ESS_threshold = 0.5,
  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

time T for fusion algorithm

mean_vec

vector of length 2 for mean

sd_vec

vector of length 2 for standard deviation

corr

correlation value between component 1 and component 2

betas

vector of length c, where betas[c] is the inverse temperature value for c-th posterior

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)

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

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

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


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