CatDirichlet: Create objects of type "CatDirichlet".
Description
Create an object of type "CatDirichlet", which represents the Categorical-Dirichlet(Multinomial-Dirichlet) conjugate structure:
pi|alpha ~ Dir(alpha)
x|pi ~ Categorical(pi)
This object will be used as a place for recording and accumulating information in the related inference/sampling functions such as posterior(), posteriorDiscard(), MAP() and so on. A categorical distribution is defined on a set of unique labels, usually these labels are integers, they can also be characters and factors.
an object of type "CatDirichlet". If "objCopy" is not NULL, the function create a new "CatDirichlet" object by copying the content from objCopy, otherwise this new object will be created by using "ENV" and "gamma". Default NULL.
ENV
environment, specify where the object will be created.
gamma
list, a named list of parameters, gamma=list(alpha,uniqueLabels). Where gamma$alpha is a numeric vector specifying the parameters of the Dirichlet distribution, gamma$uniqueLables is a integer/character vector specifying the unique category labels of the Categorical distribution.
Value
An object of class "CatDirichlet".
References
Murphy, Kevin P. Machine learning: a probabilistic perspective. MIT press, 2012.