`cmvnfactory`

Construct a conditional multi-variate normal distribution structure

**Syntax**

D = cmvnfactory(datadim, conddim)

**Description**

`D = cmvnfactory(datadim, conddim)` returns a structure representing a conditional normal distribution. `datadim` is the data dimensions and `conddim` is the condition dimensions.

**Distribution Parameters**

(`W``(conddim)-by-(datadim+1)`matrix) : A matrix containing weights from input space to output.(`sigma``conddim-by-conddim`matrix) : The covariance matrix (or the variance, , when`datadim`=1).

**Probability Density Function**

The distribution has the following density:

where is the data space dimensions, is the covariance matrix and is the mean vector computed by

`name`

See distribution structure common members.

`M`

See distribution structure common members.

`dim`

See distribution structure common members.

`datadim`

See distribution structure common members.

`conddim`

`ll`

See distribution structure common members.

`llvec`

See distribution structure common members.

`llgrad`

See distribution structure common members.

`llgraddata`

See distribution structure common members.

`cdf`

See distribution structure common members.

`pdf`

See distribution structure common members.

`sample`

See distribution structure common members.

`randparam`

See distribution structure common members.

`init`

See distribution structure common members.

`estimatedefault`

Default estimation function for conditional multi-variate normal distribution. This function implements the maximum likelihood method.

**Syntax**

theta = D.estimatedefault(data) theta = D.estimatedefault(data, options) [theta, D] = D.estimatedefault(...) [theta, D, info] = D.estimatedefault(...) [theta, D, info, options] = D.estimatedefault(...)

**Description**

`theta = D.estimatedefault(data)` returns estimated parameters for the distribution `D`, using `data`.

`theta = D.estimatedefault(data, options)` utilizes applicable options from the `options` structure in the estimation procedure.

`[theta, D] = D.estimatedefault(...)` also returns `D`, the distribution structure for which `theta` is applicable. (This is the same as the distribution structure `D` from which you called `estimate`, and so it should not normally be used. The purpose of including it in the output is to maintain compatibility with other estimation functions).

`[theta, D, info] = D.estimatedefault(...)` also returns `info`, a structure array containing information about successive iterations performed by iterative estimation functions.

`[theta, D, info, options] = D.estimatedefault(...)` also returns the effective `options` used, so you can see what default values the function used on top of the options you possibly specified.

For information about the output `theta`, see Distribution Parameters Structure. The input argument `data` is described in Data Input Argument to Functions. You may also want to read about `options` or `info` arguments.

**Available Options**

Currently no options are available for this function.

**Returned info fields**

The method used is not iterative and so the returned `info` is empty.

**Example**

% create a cmvn distribution D = cmvnfactory(1, 1); % generate 1000 random data points data = randn(2,1000) .* 2 + 1; % estimate distribution parameters to fit the data theta = D.estimatedefault(data)

`penalizerparam`

See distribution structure common members.

**Penalizer Info**

The default penalizer for this distribution is the Inverse-Wishart distribution for covariance and Normal distribution for mean

Inverse-Wishart prior on covariance has the following form:

where

(scalar) : Degrees of freedom.`nu`(`invLambda``datadim-by-datadim`matrix) : The inverse scale matrix.

Normal prior on the mean has the following form:

where

(`mu_p``datadim-by-1`vector) : The mean vector.(scalar) : the shrinkage parameter`kappa`

`penalizercost`

See distribution structure common members.

`penalizergrad`

See distribution structure common members.

`sumparam`

See distribution structure common members.

`scaleparam`

See distribution structure common members.

`sumgrad`

See distribution structure common members.

`scalegrad`

See distribution structure common members.

`entropy`

See distribution structure common members.

`kl`

See distribution structure common members.

`AICc`

See distribution structure common members.

`BIC`

See distribution structure common members.