DREAM
Markov Chain Monte Carlo acceleration by Differential Evolution
DREAM
is a MATLAB program which
implements the DREAM algorithm for accelerating
Markov Chain Monte Carlo (MCMC) convergence using differential evolution,
by Guannan Zhang.
DREAM requires user input in the form of five FORTRAN90
subroutines:

problem_size(), defines the sizes of problem parameters;

problem_value(), defines the value of problem parameters;

prior_density(), evaluates the prior distribution;

prior_sample(), samples the prior distribution;

sample_likelihood(), evaluates the log likelihood function.
Examples of such user input are listed below.
DREAM requires access to he
pdflib library, which can evaluate a variety of Probability
Density Functions (PDF's) and produce samples from them.
The user may wish to invoke this library when constructing
some of the user functions.
DREAM requires access to the
rnglib library, in order to generate random numbers.
The DREAM program was originally developed by Guannan Zhang, of
Oak Ridge National Laboratory (ORNL); it has been incorporated into
the DAKOTA package of Sandia National Laboratory, and forms
part of the ORNL package known as TASMANIAN.
Web Link:
A version of the DREAM library is available in
http://tasmanian.ornl.gov,
the TASMANIAN library, available from Oak Ridge National Laboratory.
Licensing:
The computer code and data files described and made available on this
web page are distributed under
the GNU LGPL license.
Languages:
DREAM is available in
a C version and
a C++ version and
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
PDFLIB,
a MATlAB library which
evaluates Probability Density Functions (PDF's)
and produces random samples from them,
including beta, binomial, chi, exponential, gamma, inverse chi,
inverse gamma, multinomial, normal, scaled inverse chi, and uniform.
RNGLIB,
a MATLAB library which
implements a random number generator (RNG) with splitting facilities,
allowing multiple independent streams to be computed,
by L'Ecuyer and Cote.
Author:
Original FORTRAN90 version by Guannan Zhang;
MATLAB version by John Burkardt.
Reference:

Pierre LEcuyer, Serge Cote,
Implementing a Random Number Package with Splitting Facilities,
ACM Transactions on Mathematical Software,
Volume 17, Number 1, March 1991, pages 98111.

Jasper Vrugt, CJF ter Braak, CGH Diks, Bruce Robinson, James Hyman,
Dave Higdon,
Accelerating Markov Chain Monte Carlo Simulation by Differential
Evolution with SelfAdaptive Randomized Subspace Sampling,
International Journal of Nonlinear Sciences and Numerical
Simulation,
Volume 10, Number 3, March 2009, pages 271288.
Examples and Tests:
PROBLEM0 is a small sample problem, in 10 dimensions, with a
density that is the maximum of two gaussians centered at (5,5,...,5)
and (5,5,...,5).

problem0.f90,
is a user written file, containing 5 functions, which
define the data for problem 0.

problem0_output.txt,
the output file.

problem0_chain01.txt,
a chain data file.

problem0_chain02.txt,
a chain data file.

problem0_chain03.txt,
a chain data file.

problem0_chain04.txt,
a chain data file.

problem0_chain05.txt,
a chain data file.

problem0_chain06.txt,
a chain data file.

problem0_chain07.txt,
a chain data file.

problem0_chain08.txt,
a chain data file.

problem0_chain09.txt,
a chain data file.

problem0_chain10.txt,
a chain data file.

problem0_gr.txt,
the GelmanRubin statistic file.

problem0_restart.txt,
the restart file.
PROBLEM1 is based on the first example in the Vrugt reference.
The Vrugt version involves 100 variables, with a multidimensional
normal distribution with specified mean vector and covariance matrix.
So far, I have simply set up the user routines, with just 5 variables,
and created a small standalone main program to test it.

problem1.f90,
is a user written file, containing the 5 functions required
to define the problem data, as well as other functions to
set the covariance for problem 1.

problem1_main.f90,
a standalone main program that calls the user functions
to make some simple tests.

problem1_main_output.txt,
the output file from the standalone main program.
PROBLEM2 is based on the second example in the Vrugt reference.
The Vrugt version involves 10 variables, with a "twisted" Gaussian
density function.

problem2.f90,
is a user written file, containing the 5 functions required
to define problem 2.
List of Routines:

chain_init.m,
starts Markov chains from a prior distribution.

chain_init_print.m,
prints the initial values for Markov chains.

chain_outliers.m,
identifies and modifies outlier chains during burnin.

chain_write.m,
writes samples of each chain to separate files.

cr_disupdate.m,
updates the CR distance.

cr_index_choose.m,
chooses a CR value.

cr_init.m,
initializes the crossover probability values.

cr_prob_update.m,
updates the CR probabilities.

diff_compute.m,
computes the differential evolution.

dream.m,
the main program.

dream_algm.m,
gets a candidate parameter sample.

filename_inc.m,
increments a partially numeric filename.

gr_compute.m,
computes the Gelman Rubin statistics R used to check convergence.

gr_init.m,
initializes GelmanRubin variables.

gr_write.m,
writes the GelmanRubin R statistics into a file.

i4mat_print.m,
prints an I4MAT.

i4mat_print_some.m,
prints some of an I4MAT.

i4vec_transpose_print.m,
prints an I4VEC "transposed".

input_print.m,
prints the data from the input file.

jumprate_choose.m,
chooses a jump rate from the jump rate table.

jumprate_table_init.m,
initializes the jump rate table.

jumprate_table_init.m,
prints the jump rate table.

r8vec_transpose_print.m,
prints an R8VEC "transposed".

restart.m,
reads parameter sample data from a restart file.

restart_write.m,
writes a restart file.

sample_candidate.m,
generates candidate parameter samples.

sample_limits.m,
enforces limits on a sample variable.

std_compute.m,
computes the current standard deviations, for each parameter.

timestamp.m,
prints the current YMDHMS date as a time stamp.
You can go up one level to
the MATLAB source codes.
Last revised on 26 January 2018.