PRTools contents |
DISTM
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 |
Computation of the square Euclidean 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 DISTM(A,B) is equivalent to A*PROXM(B,'d',2)).
PRTools contents |