Mean pairwise AIRM distance of component covariances
Source:R/statistical_metrics_monte_carlo_overlap.R
compute_average_riemannian.RdMean pairwise AIRM distance of component covariances
Arguments
- true_theta
List validated by
check_true_theta():mu(\(G\times J\)),sigma(\(G\times G\times J\)), and optionallyp(length \(J\) or \(J\times N\)). Ifpis missing it is set to \((1/J,\ldots,1/J)\).- J
Number of cell types. Defaults to the third dimension of
sigma.
Examples
a <- diag(2)
b <- matrix(c(2, 0.5, 0.5, 1), nrow = 2)
theta <- list(
mu = cbind(c(0, 0), c(1, 0)),
sigma = array(c(a, b), dim = c(2, 2, 2))
)
compute_average_riemannian(theta)
#> [1] 0.8249946
# J = 2 has a single pair, so the average equals the pairwise AIRM.
all.equal(
compute_average_riemannian(theta),
spd_affine_invariant_distance(a, b)
)
#> [1] TRUE