Skip to contents

Computes the pairwise Mahalanobis distances using an inverse covariance matrix estimated from the data matrix `X` with shrinkage.

Usage

# S3 method for mahalanobis
pairwise_dist(obj, X)

Arguments

X

Numeric matrix where rows represent observations and columns represent variables.

dist_obj

A list that might include additional parameters for distance computation, currently unused.

Value

An object of class `dist` containing the computed Mahalanobis distances.

Examples

X <- matrix(rnorm(100), 10, 10)
dist_matrix <- pairwise_dist.mahalanobis(list(), X)
#> Error in pairwise_dist.mahalanobis(list(), X): could not find function "pairwise_dist.mahalanobis"