Description Usage Arguments Examples
Returns the squared Mahalanobis distance of an FLVector x and FLVector y with respect to a covariance matrix sigma = S. D^2 = (x - y)' Σ^-1 (x - y)
1 | mahalanobis(x, y, S, ...)
|
x |
An FLVector of data with say, p columns. |
y |
An FLVector of data with say, p columns. |
S |
A covariance matrix of the distribution(p*p) |
1 2 3 4 5 6 | x<-FLVector(c(0,0))
y<-FLVector(1:2)
ma<-cbind(1:6,1:3)
s<-var(ma)
S<-as.FLMatrix(s)
mahalanobis(x,y,S)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.