Construct a factorial distribution structure
D = factorialfactory(ComponentD, num) D = factorialfactory(ComponentD)
D = factorialfactory(ComponentD, num) returns a structure representing a factorial distribution. ComponentD is a distribution structure defining facorial distribution type, and num is the number of factors.
D = factorialfactory(ComponentD) where ComponentD is a cell array of distribution structures defined on the same data space, constructs a heterogeneous factorial distribution D where each component may be of a different distribution type.
- D (num-by-1 cell array of distribution parameter structures) : Contains the parameters for each component.
- W (num-by-num matrix) : The mixing matrix.
Probability Density Function
The distribution has the following density:
where is the number of components, is the k-th row of mixing matrix , and represents the density function for k-th component.
Flag to control the memory usage (resulting code will be slower)
Number of components (excluding any fixed components)
num = D.num()
D_k = D.component(k)
Extract a subset of component parameters
subtheta = D.subparam(theta, idx)
The default penalizer for the mixture distribution is the mixture of the default penalizers of its components, with equal weights.