Description Usage Arguments Value References Examples
For a given 3-dimensional array where symmetric positive definite (SPD) matrices are stacked slice by slice, it computes pairwise distance using various popular measures. Some of measures are metric as they suffice 3 conditions in mathematical context; nonnegative definiteness, symmetry, and triangle inequalities. Other non-metric measures represent dissimilarities between two SPD objects.
1 2 3 4 5 6 7 |
A |
a (p\times p\times N) 3d array of N SPD matrices. |
method |
the type of distance measures to be used; |
power |
a non-zero number for PowerEuclidean distance. |
an (N\times N) symmetric matrix of pairwise distances.
arsigny_log-euclidean_2006CovTools
\insertRefdryden_non-euclidean_2009CovTools
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## generate 100 SPD matrices of size (5-by-5)
samples = samplecovs(100,5)
## get pairwise distance for "AIRM"
distAIRM = CovDist(samples, method="AIRM")
## dimension reduction using MDS
ss = cmdscale(distAIRM)
## visualize
opar <- par(no.readonly=TRUE)
plot(ss[,1],ss[,2],main="2d projection")
par(opar)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.