parallel_h_fusion_mixG: Standard Hierarchical Monte Carlo Fusion

Description Usage Arguments Value Examples

Description

Hierarchical Monte Carlo Fusion with base level with nodes that are tempered mixture Gaussians with same weights, means, sds components

Usage

1
2
parallel_h_fusion_mixG(N_schedule, time_schedule, start_beta, C_schedule,
  L, base_samples, weights, means, sds, study = F)

Arguments

N_schedule

vector of length (L-1), where N_schedule[l] is the number of samples per node at level l

time_schedule

vector of legnth(L-1), where time_schedule[l] is the time chosen for Fusion at level l

start_beta

beta for the base level

C_schedule

vector of length (L-1), where C_schedule[l] is the number of samples to fuse for level l

L

total number of levels in the hierarchy

base_samples

list of length (1/start_beta), where samples_to_fuse[c] containg the samples for the c-th node in the level

weights

vector: weights of mixture Gaussian

means

vector: means of mixture Gassuan

sds

vector: st.devs of mixture Gaussian

study

boolean value: defaults to F, determines whether or not to return acceptance probabilities

Value

samples samples from hierarchical fusion

time vector of length (L-1), where time[l] is the run time for level l

rho_acc vector of length (L-1), where rho_acc[l] is the acceptance rate for first fusion step for level l

Q_acc vector of length (L-1), where Q_acc[l] is the acceptance rate for second fusion step for level l

input_betas list of length (L), where input_betas[[l]] is the input betas for level l

output_beta vector of length(L-1), where output_beta[l] is the beta for level l

diffusion_times vector of length (L-1), where diffusion_times[l] are the times for fusion in level l (= time_schedule)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# setting variables
w_example <- c(0.35, 0.65)
m_example <- c(-3, 8)
s_example <- c(1, 1.5)
b_example <- 1/4

# sampling from tempered density
nsamples <- 500000
base <- hmc_base_sampler_mixG(w_example, m_example, s_example, b_example, nsamples, 4)

test <- parallel_h_fusion_mixG(N_schedule = rep(10000, 2), time_schedule = rep(1, 2),
                               start_beta = b_example, C_schedule = rep(2, 2), L = 3, base_samples = base,
                               weights = w_example, means = m_example, sds = s_example, study = T)

# plot results
plot_levels_hier_mixG(test, weights = w_example, means = m_example, sds = s_example,
                      from = -15, to = 20, plot_rows = 3, plot_columns = 1, bw = c(0.2, 0.3, 0.4))

rchan26/mixGaussTempering documentation built on June 14, 2019, 3:26 p.m.