This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.

3.12.3. nistats.utils.multiple_mahalanobis

nistats.utils.multiple_mahalanobis(effect, covariance)

Returns the squared Mahalanobis distance for a given set of samples

effect: array of shape (n_features, n_samples),

Each column represents a vector to be evaluated

covariance: array of shape (n_features, n_features, n_samples),

Corresponding covariance models stacked along the last axis

sqd: array of shape (n_samples,)

the squared distances (one per sample)