The Stick Breaking representation of the Dirichlet process.
The Stick Breaking representation of the Dirichlet process.
A Dirichlet process can be represented using a stick breaking construction [REMOVE_ME]G=∑i=1npiiδθi[REMOVEME2], where πk=βk∏k=1n−1(1−βk) are the stick breaking weights. The atoms δθi are drawn from G0 the base measure of the Dirichlet Process. The βk∼Beta(1,α). In theory n should be infinite, but we chose some value of N to truncate the series. For more details see reference.
StickBreaking(alpha, N)piDirichlet(betas)
Arguments
alpha: Concentration parameter of the Dirichlet Process.
N: Truncation value.
betas: Draws from the Beta distribution.
Returns
Vector of stick breaking probabilities.
Description
A Dirichlet process can be represented using a stick breaking construction
G=i=1∑npiiδθi
, where πk=βk∏k=1n−1(1−βk) are the stick breaking weights. The atoms δθi are drawn from G0 the base measure of the Dirichlet Process. The βk∼Beta(1,α). In theory n should be infinite, but we chose some value of N to truncate the series. For more details see reference.
Functions
piDirichlet(): Function for calculating stick lengths.
References
Ishwaran, H., & James, L. F. (2001). Gibbs sampling methods for stick-breaking priors. Journal of the American Statistical Association, 96(453), 161-173.