Description Usage Arguments Value References See Also
View source: R/Dirichlet_Process.r
For the model structure:
G|gamma \sim DP(gamma,U)
pi_j|G,alpha \sim DP(alpha,G), j = 1:J
z|pi_j \sim Categorical(pi_j)
k|z,G \sim Categorical(G), \textrm{ if z is a sample from the base measure G}
where DP(gamma,U) is a Dirichlet Process on positive integers, gamma is the "concentration parameter", U is the "base measure" of this Dirichlet process, U is an uniform distribution on all positive integers. DP(alpha,G) is a Dirichlet Process on integers with concentration parameter alpha and base measure G. Categorical() is the Categorical distribution. See dCategorical
for the definition of the Categorical distribution.
In the case of CatHDP, z and k can only be positive integers.
Update the prior knowledge by adding the information of newly observed samples z and k. The model structure and prior parameters are stored in a "CatHDP" object, the prior parameters in this object will be updated after running this function.
1 2 |
obj |
A "CatHDP" object. |
ss1 |
Sufficient statistics of k. In CatHDP case the sufficient statistic of sample k is k itself(if k is a integer vector with all positive values). |
ss2 |
Sufficient statistics of z. In CatHDP case the sufficient statistic of sample z is z itself(if z is a integer vector with all positive values). |
j |
integer, group label. |
w |
Sample weights, default NULL. |
... |
Additional arguments to be passed to other inherited types. |
None. the model stored in "obj" will be updated based on "ss1" and "ss2".
Teh, Yee W., et al. "Sharing clusters among related groups: Hierarchical Dirichlet processes." Advances in neural information processing systems. 2005.
CatHDP
,posteriorDiscard.CatHDP
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.