Library: | xclust |
See also: | aerlb lpdist distance |
Quantlet: | discrim | |
Description: | computes the discrimination function for an obs x given samples x1 and x2 |
Usage: | d = discrim(x1, x2, x) | |
Input: | ||
x1 | n1 x p matrix (sample 1) | |
x2 | n2 x p matrix (sample 2) | |
x | p x 1 vector (the obs to be classified) | |
Output: | ||
d | 1 x 2 vector (the distance to the two samples) Note It is assumed that both samples have identical cov structure |
library("xplore") library("xclust") x1 = normal(100, 2) x2 = normal(100, 2) + 0.8 x = normal(2) + 0.6 d = discrim(x1, x2, x) d
[1,] 0.720965 0.030024
Library: | xclust |
See also: | aerlb lpdist distance |