mvDPPValueScaling
- Scaling move applied to individual categories of a Dirichlet process mixture
x : | RealPos[] (<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 a non-negative real number drawn from an exponential distribution
x ~ dnDPP(1, dnExp(1), 3)
# Next, we add the move. Note that without moves other than
# mvDPPValueScaling, 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] = mvDPPValueScaling(x, weight=1)
monitors[1] = mnScreen(x, printgen=1)
mymodel = model(x)
mymcmc = mcmc(mymodel, monitors, moves)
mymcmc.run(generations=50)