mvDPPValueBetaSimplex
- Beta simplex move applied to individual categories of a Dirichlet process mixture
x : | Simplex[] (<stochastic> pass by reference) |
The variable on which this move operates. | |
weight : | RealPos (pass by value) |
The weight determines the relative frequency with which this move will be attempted. For details, see the description of the 'moveschedule' parameter on the documentation page for 'mcmc()'. | |
Default : 1 | |
tuneTarget : | Probability (pass by value) |
The acceptance probability targeted by auto-tuning. | |
Default : 0.44 |
# Here, we draw from a DP mixture for 3 elements, where every element
# is itself a 2-element simplex drawn from a flat Dirichlet distribution
x ~ dnDPP(1, dnDirichlet( [1, 1] ), 3)
# Next, we add the move. Note that without moves other than
# mvDPPValueBetaSimplex, only the values of the categories will be
# updated: the total number of categories and the assignment of elements
# to categories will be determined by the initial draw.
moves[1] = mvDPPValueBetaSimplex(x, weight=1)
monitors[1] = mnScreen(x, printgen=1)
mymodel = model(x)
mymcmc = mcmc(mymodel, monitors, moves)
mymcmc.run(generations=50)