Simulation Results: Parameter Estimation

Một phần của tài liệu SEQUENTIAL MONTE CARLO METHODS FOR PROBLEMS ON FINITE STATE SPACES (Trang 100 - 105)

In order to test the above two PMCMC algorithms, we will compare samples drawn exactly from the posterior density with those samples generated by the PMCMC al- gorithms. The likelihood is computable when the size of the network model is small, so we consider a small size network model so that we can use an marginal MCMC algorithm to draw samples from the posterior density q(p|Gt). In addition, we can use the rejection sampling method to draw i.i.d. samples from the posterior density. The marginal MCMC is the best that the PMCMC can do. In turn, the i.i.d. samples from the rejection sampling provide the benchmark for our marginal MCMC techniques;

our samples from marginal MCMC should provide densities which are similar to those i.i.d. samples.

Additionally, we need to consider the convergence of the generated Markov Chains.

Here we will follow diagnostic methods in [12], which consider the potential scale re- duction factor (PSRF), the mixture-of-sequence variance (V) and the within-sequence variance (W). The approach indicates that if the PSRF is close to 1 and V is almost equal to W, we can conclude that convergence is attained. This can be observed and presented visually based on the Graphical Approach in Part 2 of [12]. We can also obtain the estimated effective number of samples (NEFF) which is a quantity that estimates the number of independent samples obtained from the target density. Then we can set the effective number of samples depending on the above three factors.

3.6 Simulation Results: Parameter Estimation

3.6.1 Process of drawing samples

We generate a network with 8 nodes and p= 0.66. Then one can use the marginal MCMC method with the MH ratio given in Equation 3.5.1 to obtain samples from the posterior density. Here we perform 10000 iterations in each of 9 Markov Chains with 9 different starting values, {0.1,0.2, . . . ,0.9}, then we select every fifth sample to constitute 2000 samples in each chain. This process is repeated for both the SMC version and the DPF version of PMCMC algorithm, withN = 100 in each version when approximating the likelihood, to get 2000 samples in each of 9 chains respectively.

Figure 3.6.1 contains diagnostic plots associated to the convergence of the above three types of Markov Chains. For the marginal MCMC samples, plots (a) and (b) tell us that the convergence condition is attained around iteration 1200; for the SMC version of PMCMC samples, from plots (c) and (d), we can see that the convergence condition is attained around iteration 800; for the DPF version of PMCMC samples, plots (e) and (f) show that the convergence condition is attained around iteration 1200.

Also, the values of NEFF for the above three types of samples are 18000, 6513.8 and 7436 respectively. Using these results and the diagnostic methods in [12], we get that the appropriate effective samples are the last 800, 700 and 800 in each chain. Above all, for the purpose of comparison, we choose the last 700 samples in each of 9 chains, all together are 6300 samples generated by each of the three methods.

Also, we will use the rejection sampling method to draw i.i.d. samples from

(a) MCMC samples.

0 400 800 1200 1600 2000 0.977

0.982 0.987 0.992 0.997 1.002 1.007 1.012

Iteration No.

PSRF

(b) MCMC samples.

0 400 800 1200 1600 2000 0.034

0.037 0.04 0.043 0.046 0.049

Iteration No.

W & V

W V

(c) SMC version of PMCMC samples.

0 400 800 1200 1600 2000 0.99

0.995 1 1.005 1.01 1.015 1.02

Iteration No.

PSRF

(d) SMC version of PMCMC samples.

0 400 800 1200 1600 2000 0.036

0.037 0.038 0.039 0.04 0.041 0.042 0.043

Iteration No.

W & V

W V

(e) DPF version of PMCMC samples.

0 400 800 1200 1600 2000 0.965

0.975 0.985 0.995 1.005 1.015

Iteration No.

PSRF

(f) DPF version of PMCMC samples.

0 400 800 1200 1600 2000 0.033

0.035 0.037 0.039 0.041 0.043

Iteration No.

W & V

W V

Figure 3.6.1 Figures for Convergence diagnostic: the LHS are PSRF plots; the RHS are variance estimation plots. For marginal MCMC samples, plots (a) and (b) suggest that convergence is obtained around iteration 1200 for each Markov Chain; for the SMC version of PMCMC samples, plots (c) and (d) suggest that convergence is obtained around iteration 800 for each Markov Chain; for the DPF version of PMCMC samples, plots (e) and (f) suggest that convergence is obtained around iteration 1000 for each Markov Chain.

q(p|Gt) ∝ Lp(Gt). The details of the rejection sampling algorithm are given in Al- gorithm A.1 of Appendix A.2. We repeated the rejection sampling algorithm until we get a desired number of samples. In this thesis, we will generate 6,300 samples.

3.6 Simulation Results: Parameter Estimation

3.6.2 Analysis of samples

After the above sampling process, we have four types of samples, the marginal MCMC samples and the i.i.d samples are drawn from the exact posterior density, the other two types of samples are obtained by the SMC version and the DPF version of PMCMC algorithms, with 57188.26 and 46755.27 seconds of computation time respectively. We will now compare our results.

Figure 3.6.2 has two kinds of plots, one is the trace plot, the other one is an auto- correlation plot; they help to represent the mixing of the Markov Chains. Here given a sequence of variables p1, p2, . . . , pn, with pi represent the value of the sampling process at time i, the lag k auto-correlation function is defined as rk =

Pn−k

i=1(pi−¯p)(pi+k−¯p) Pn

i=1(pi−¯p)2 . From this figure, we see that the marginal MCMC, the SMC and the DPF versions of PMCMC algorithms all generate good mixing samples, so these samples can really show the properties of the distributions they are drawn from.

Figure 3.6.3 contains histograms with fitted density lines of those four types of samples. Compared with the fitted density line of i.i.d samples in plot (d), the fitted density lines of the other three types of Markov Chain samples are almost the same.

This means that the marginal MCMC results are very close to the i.i.d samples; and the SMC and the DPF versions of PMCMC have nice representations of the marginal MCMC.

(a) MCMC samples.

0 2100 4200 6300

0 0.2 0.4 0.6 0.8 1

Iteration No.

Parameter p

(b) MCMC samples.

0 2100 4200 6300

−0.05 0 0.05

Lag k

Auto−correlation

(c) SMC version of PMCMC samples.

0 2100 4200 6300

0 0.2 0.4 0.6 0.8 1

Iteration No.

Parameter p

(d) SMC version of PMCMC samples.

0 2100 4200 6300

−0.05 0 0.05

Lag k

Auto−correlation

(e) DPF version of PMCMC samples.

0 2100 4200 6300

0 0.2 0.4 0.6 0.8 1

Iteration No.

Parameter p

(f) the DPF version of PMCMC samples.

0 2100 4200 6300

−0.05 0 0.05

Lag k

Auto−correlation

Figure 3.6.2 Figures for data analysis: the LHS are trace plots; the RHS are auto- correlation plots. Figures (a)-(f) show that the marginal MCMC, the SMC and the DPF versions of PMCMC algorithms all generate good mixing samples.

Một phần của tài liệu SEQUENTIAL MONTE CARLO METHODS FOR PROBLEMS ON FINITE STATE SPACES (Trang 100 - 105)

Tải bản đầy đủ (PDF)

(211 trang)