Directory | Changes | Lines of Code | Lines per Change |
---|---|---|---|
Totals | 23 (100.0%) | 2976 (100.0%) | 129.3 |
src/dr/math/ | 9 (39.1%) | 2058 (69.2%) | 228.6 |
src/dr/evomodel/coalescent/operators/ | 5 (21.7%) | 763 (25.6%) | 152.6 |
src/dr/evomodel/coalescent/ | 2 (8.7%) | 101 (3.4%) | 50.5 |
src/dr/inference/distribution/ | 2 (8.7%) | 46 (1.5%) | 23.0 |
src/dr/inference/markovchain/ | 1 (4.3%) | 4 (0.1%) | 4.0 |
src/dr/app/beast/ | 3 (13.0%) | 3 (0.1%) | 1.0 |
src/dr/app/beastdev/ | 1 (4.3%) | 1 (0.0%) | 1.0 |
Test commit - no change
541 lines of code changed in 1 file:
Changed ExponentialMarkovPrior so that it can also produce Gamma markov priors,
to control the variation of population size across groups. Default is shape=1.0
corresponding to an exponential Markov prior.
The Bayesian skyline operator can now also use this prior; as before, with matching
priors a Gibbs sampling step is obtained.
Fixed a small bug in BeastParser.
Generalized the sampling code from the biased Gamma distribution; if G(x;shape,scale,bias)
= x^(shape-1) e^(x/scale) e^(1/(bias*x)), then this distribution is normalizable for
scale>0, bias>0 and all shape parameters (including 0); the sampling code can now handle
all these cases.
99 lines of code changed in 5 files:
Added <generalizedSkylineGibbsOperator> to BeastMain's parser.
Comment added to bayesianskylinegibbsoperator.java.
7 lines of code changed in 2 files:
Minor bugfix
1 lines of code changed in 1 file:
Cleanup of GammaDistribution.java - more straightforward algorithm to sample from a exp-weighted Gamma distribution
590 lines of code changed in 1 file:
Changed the way the Gibbs sampler for the Bayesian skyline works. Instead of
sampling all population parameters at once, they are now sampled one-at-a-time
in one-dimensional Gibbs moves.
The advantage is that the exponential Markov prior can now be efficiently incorporated
- previously this prior would cause very high rejection rates (~99%), because new states
would often have a bad prior likelihood, whereas now the Gibbs move has acceptance
rate 1.
The exponential Markov prior has been updated to also 'run in reverse' if desired,
putting a Jeffrey's prior on the most ancestral Ne rather than the most recent.
The Gibbs sampler can handle both forward and backward exponential Markov priors,
with an without a Jeffrey's prior on the first (last) Ne.
The sampling code for the exponential-weighted Gamma distribution has been updated
and is more efficient.
492 lines of code changed in 3 files:
Bugfix of exp-weighted sampling from gamma-distribution.
This version doesn't get stuck in inefficient rejection sampling.
114 lines of code changed in 1 file:
Update of the gamma + exponential sampler -- rejection sampling algorithm got too slow
17 lines of code changed in 1 file:
Bayesian skyline Gibbs operator updated to include the exponential Markov prior.
188 lines of code changed in 2 files:
The rest of the previous commit -- parser for the bayesian skyline gibbs sampler,
and additions to the gamma distribution.
500 lines of code changed in 3 files:
Added an almost-Gibbs operator for the generalized Bayesian skyline model.
The operator samples from the posterior distribution of population sizes, conditional on the genealogy,
but not including any external prior. When no prior is provided, the Hastings ratio cancels with the
ratio of likelihoods, and the operator behaves as a Gibbs sampler. Any external prior is taken into
account via the normal Metropolis step.
The operator can be restricted to sample only from a range of population sizes. This is implemented
by rejection sampling. In extreme cases, it may take -very- long to get a decent sample; so when 100
samples have been rejected, a sample at the appropriate extreme end is selected. This is a hack.
The operator can also incorporate (without rejection sampling) a Jeffrey's prior on the geometric
average of population sizes. This however is probably not very useful.
To make all this happen, I've also extended GammaDistribution to sample reliably all valid parameter
values, and some invalid ones (i.e. shape parameter = 0).
427 lines of code changed in 3 files: