PRTools contents

PRTools manual

distmaha

DISTMAHA

Mahalanobis distance

    D = DISTMAHA (A,U,G)

Input
 A Dataset
 U Mean(s) (optional; default: estimate on classes in A)
 G Covariance(s) (optional; default: estimate on classes in A)

Output
 D Mahalanobis distance matrix

Description

Computes the M*N Mahanalobis distance matrix of all vectors in M*K dataset  A to an N*K dataset of points U, using the covariance matrix or matrices  G. G should be either be one K*K matrix, or a K*K*N matrix containing a  covariance matrix for each point in U.

When U and G are not specified, it estimates the C*C Mahalanobis distance  matrix between all classes in A: the distance between the means,  relative to the average per-class covariance matrix.

See also

datasets, distm, proxm, meancov,

PRTools contents

PRTools manual