Processing math: 100%

Computes V statistic for a real matrix X, where V(X) = scaled variance of lpp distances between the row samples of X.

getRealVStat(X, p)

Arguments

X

The N×P real matrix

p

The power p of lpp, i.e., ||x||pp=(xp1+...xpn)s

Value

V(X), the variance of the pairwise lpp distance between samples

Details

Dependencies: getLpDistance

Examples

X <- matrix(nrow = 5, ncol = 10, rnorm(50))
getRealVStat(X, p = 2)
#> [1] 6.768452