PRTools Contents

PRTools User Guide

distm

DISTM

Fixed mapping for computing a square Euclidean distance matrix

    D = DISTM(A,B)
    D = DISTM(A);
    D = A*DISTM

Input
 A,B Datasets or matrices; B is optional, default B = A

Output
 D Square Euclidean distance dataset or matrix

Description

Computation of the distance matrix D between two sets A and B.  If A has M objects and B has N objects, then D is [M x N]. If A and B are  datasets, then D is a dataset as well with the labels defined by the  labels of A and the feature labels defined by the labels of B.

Unlabeled objects in B are neglected, unless B is entirely unlabeled.  If A is not a dataset, but a matrix of doubles then D is also not a  dataset, but a set of doubles.

NOTE (1) DISTM was in older Matlab versions for large datasets considerable faster  than PDIST2. Now it uses internally PDIST2.

NOTE (2) The default distance meansure used by DISTM is the square of the  Euclidean distance. This can be changed by calling DISTYPE which sets a  global used by DISTM.

NOTE (3) DISTM(A,B) is equivalent to A*PROXM(B,'d',2)).

See also

datasets, proxm, distype, pdist2,

PRTools Contents

PRTools User Guide

This file has been automatically generated. If badly readable, use the help-command in Matlab.