# factorialfactory

## factorialfactory

Construct a factorial distribution structure

Syntax

```D = factorialfactory(ComponentD, num)
D = factorialfactory(ComponentD)
```

Description

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.

Distribution Parameters

• 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.

## name

Flag to control the memory usage (resulting code will be slower)

## num

Number of components (excluding any fixed components)

Syntax

```num = D.num()
```

## component

Component distributions

Syntax

```D_k = D.component(k)
```

## subparam

Extract a subset of component parameters

Syntax

```subtheta = D.subparam(theta, idx)
```

## penalizerparam

Penalizer Info

The default penalizer for the mixture distribution is the mixture of the default penalizers of its components, with equal weights.