# cmvnfactory

## 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

## 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

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

• nu (scalar) : Degrees of freedom.

Normal prior on the mean has the following form:

where

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