Description Usage Arguments Details Value Note Author(s) References See Also Examples
Multiple MCMC chains based algorithms (e.g., parallel tempering, evolutionary Monte Carlo) need a temperature ladder. This function places the intermediate temperatures between the minimum and the maximum temperature for the ladder.
Below sampDim refers to the dimension of the sample space,
temperLadderLen refers to the length of the temperature ladder,
and levelsSaveSampForLen refers to the length of
levelsSaveSampFor. Note, this function calls
evolMonteCarlo, so some of the arguments below have the
same name and meaning as the corresponding ones for
evolMonteCarlo. See details below for explanation
on the arguments.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | placeTempers(nIters,
acceptRatioLimits,
ladderLenMax,
startingVals,
logTarDensFunc,
MHPropNewFunc,
logMHPropDensFunc = NULL,
temperLadder = NULL,
temperLimits = NULL,
ladderLen = 15,
scheme = 'exponential',
schemeParam = 1.5,
guideMe = TRUE,
levelsSaveSampFor = NULL,
saveFitness = FALSE,
verboseLevel = 0,
...)
|
nIters |
|
acceptRatioLimits |
|
ladderLenMax |
|
startingVals |
|
logTarDensFunc |
|
MHPropNewFunc |
|
logMHPropDensFunc |
|
temperLadder |
|
temperLimits |
|
ladderLen |
|
scheme |
|
schemeParam |
|
guideMe |
|
levelsSaveSampFor |
|
saveFitness |
|
verboseLevel |
|
... |
optional arguments to be passed to |
This function is based on the temperature placement method introduced in section 4.2 of Goswami and Liu (2007).
acceptRatioLimitsThis is a range for the estimated acceptance ratios for the random exchange move for the consecutive temperature levels of the final ladder. It is recommended that specified range is between 0.3 and 0.6.
ladderLenMaxIt is preferred that one specifies
acceptRatioLimits for constructing the final temperature
ladder. However, If one has some computational limitations then
one could also specify ladderLenMax which will limit the
length of the final temperature ladder produced. This also serves
as an upper bound on the number of temperature levels while
placing the intermediate temperatures using the
acceptRatioLimits.
temperLadderThis is the temperature ladder needed for
the second stage preliminary run. One can either specify a
temperature ladder via temperLadder or specify
temperLimits, ladderLen, scheme and
schemeParam. For details on the later set of parameters,
see below. Note, temperLadder overrides
temperLimits, ladderLen, scheme and
schemeParam.
temperLimitstemperLimits = c(lowerLimit,
upperLimit) is a two-tuple of positive numbers, where the
lowerLimit is usually 1 and upperLimit is a number
in [100, 1000]. If stochastic optimization (via sampling) is the
goal, then lowerLimit is taken to be in [0, 1]. Often the
upperLimit is the maximum temperature as suggested by
findMaxTemper.
ladderLen, scheme and schemeParamThese
three parameters are required (along with temperLimits) if
temperLadder is not provided. We recommend taking
ladderLen in [15, 30]. The allowed choices for
scheme and schemeParam are:
scheme | schemeParam |
| ======== | ============= |
| linear | NA |
| log | NA |
| geometric | NA |
| mult-power | NA |
| add-power | >= 0 |
| reciprocal | NA |
| exponential | >= 0 |
| tangent | >= 0 |
We recommended using scheme = 'exponential' and
schemeParam in [1.5, 2].
guideMeIf guideMe = TRUE, then the function
suggests different modifications to alter the setting towards a
re-run, in case there are problems with the underlying MCMC run.
levelsSaveSampForThis is passed to
evolMonteCarlo for the underlying MCMC run.
This function returns a list with the following components:
finalLadder |
the final temperature ladder found by placing the
intermediate temperatures to be used in |
temperLadder |
the temperature ladder used for the underlying MCMC run. |
acceptRatiosEst |
the estimated acceptance ratios for the random
exchange move for the consecutive temperature levels of
|
CVSqWeights |
this is the square of the coefficient of variation
of the weights of the importance sampling estimators used to
estimate the acceptance ratios, namely, |
temperLimits |
the sorted |
acceptRatioLimits |
the sorted |
nIters |
the post burn-in |
levelsSaveSampFor |
the |
draws |
|
startingVals |
the |
time |
the time taken by the run. |
The effect of leaving the default value NULL for some of the
arguments above are as follows:
logMHPropDensFunc
| the proposal density MHPropNewFunc is deemed symmetric.
|
temperLadder
| valid temperLimits, ladderLen, scheme and
schemeParam
|
are provided, which are used to construct the temperLadder.
|
|
temperLimits
| a valid temperLadder is provided.
|
levelsSaveSampFor
| temperLadderLen.
|
Gopi Goswami goswami@stat.harvard.edu
Gopi Goswami and Jun S. Liu (2007). On learning strategies for evolutionary Monte Carlo. Statistics and Computing 17:1:23-38.
findMaxTemper, parallelTempering,
evolMonteCarlo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ## Not run:
placeTempersObj <-
with(VShapedFuncGenerator(-13579),
placeTempers(nIters = 10000,
acceptRatioLimits = c(0.5, 0.6),
ladderLenMax = 50,
startingVals = c(0, 0),
logTarDensFunc = logTarDensFunc,
MHPropNewFunc = MHPropNewFunc,
temperLimits = c(1, 5),
ladderLen = 10,
levelsSaveSampFor = seq_len(10),
verboseLevel = 1))
print(placeTempersObj)
print(names(placeTempersObj))
with(placeTempersObj,
{
par(mfcol = c(3, 3))
for (ii in seq_along(levelsSaveSampFor)) {
main <- paste('temper:', round(temperLadder[levelsSaveSampFor[ii]], 3))
plot(draws[ , , ii],
xlim = c(-4, 20),
ylim = c(-8, 8),
pch = '.',
ask = FALSE,
main = as.expression(main),
xlab = as.expression(substitute(x[xii], list(xii = 1))),
ylab = as.expression(substitute(x[xii], list(xii = 2))))
}
})
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.