PRTools contents

PRTools manual

nbayesc

NBAYESC

Bayes Classifier for given normal densities

    W = NBAYESC(U,G)

Input
 U Dataset of means of classes
 G Covariance matrices (optional; default: identity matrices)

Output
 W Bayes classifier

Description

Computation of the Bayes normal classifier between a set of classes.  The means, labels and priors are defined by the dataset U of the size  [C x K]. The covariance matrices are stored in a matrix G of the  size [K x K x C], where K and C correspond to the dimensionality and  the number of classes, respectively.

If C is 1, then G is treated as the common covariance matrix, yielding  a linear solution. For G = I, the nearest mean solution is obtained.

This routine gives the exact solution for the given parameters, while  the trainable classifiers QDC and LDC give approximate solutions, based  on the parameter estimates from a training set. For a given dataset, U and G can be computed by MEANCOV.

Example(s)

 [U,G] = MEANCOV(GENDATB(25));
 W = NBAYESC(U,G);

See also

mappings, datasets, qdc, ldc, nmc,

PRTools contents

PRTools manual