Questions tagged [mahalanobis-distance]

Question that relates or uses the Mahalanobis distance metric.

The Mahalanobis distance is a measure of the distance between a point P and a distribution D, introduced by P. C. Mahalanobis in 1936. It is a multi-dimensional generalization of the idea of measuring how many standard deviations away P is from the mean of D. This distance is zero if P is at the mean of D, and grows as P moves away from the mean along each principal component axis.

$X=(x_{1}, x_{2},...,x_{N})^{T}$

$\mu=(\mu_{1},\mu_{2},...,\mu_{N})^{T}$

$S$ is the covariance matrix of $X$

The Mahalanobis distance is: $D_{M}(X)=\sqrt{(X-\mu)^{T}S^{-1}(X-\mu)}$

source: https://en.wikipedia.org/wiki/Mahalanobis_distance

56 questions
16
votes
1 answer

"we note that the matrix Σ can be taken to be symmetric, without loss of generality"

I'm reading the book Pattern Recognition and Machine Learning by Christopher Bishop, and on page 80, with regard to the multivariate gaussian distribution: $$ \mathcal{N}(\mathbf{x} | \boldsymbol{\mu}, \boldsymbol{\Sigma}) = …
6
votes
1 answer

Proving that Mahalanobis norm is a norm indeed

While reading this thread I wanted to prove that Mahalanobis norm $\lVert{x-y}\rVert_m$ is a norm indeed. The norm is defined like so: $\lVert{x-y}\rVert_m=d(x-y,0)=d(x,y)=\sqrt{(x-y)^T S (x-y)}=\sqrt{(x-y,x-y)_m}$, where $(x,y)_m$ is the…
JMFS
  • 247
5
votes
1 answer

Sparse Approximation in the Mahalanobis Distance

Given a vector $z \in \mathbb{R}^n$ and $k < n$, finding the best $k$-sparse approximation to $z$ in terms of the Euclidean distance means solving $$\min_{\{x \in \mathbb{R}^n : ||x||_0 \le k\}} ||z - x||_2$$ This can easily be done by choosing $x$…
5
votes
1 answer

Malalanobis distance between two multivariate Gaussian distributions

Let $\mathbf{x}\in\Bbb{R}^n$ be an $n$-dimensional real vector distributed normally with mean vector $\mu\in\Bbb{R}^n$ and covariance matrix $\Sigma$; i.e. $\mathbf{x}\sim\mathcal{N}(\mu,\Sigma)$. The Mahalanobis distance of $\mathbf{x}$ is defined…
4
votes
1 answer

Derivative of Mahalanobis pairwise distance matrix respect to transformation matrix

For a set of vectorial observations $x_i$ stored in the matrix $X$, I would like to obtain the gradient of the pairwise Mahalanobis distance matrix $D$ with respect to the Mahalanobis transformation matrix $M$ ($\frac{\partial D}{\partial M}$),…
3
votes
0 answers

What's the distance between triangles?

How can we define distance between, say, two of them? And if we the distance between two of them and the distance of another one to the first, do we know its distance tö rhe second? What ways are possible to induce a distance on them. The middle…
3
votes
0 answers

Multivariate 68–95–99.7 rule for Normal Distributions

For the univariate Normal Distribution, the 68–95–99.7 rule states the percentage of points lying within the intervals defined by the one, two, and three times standard deviation. Or in other words, the probability of a sampled point lying in…
Chris
  • 187
  • 6
2
votes
0 answers

Mahalanobis distance on the tangent space of a point in $n$-sphere

Let $\mathbb{S}^n$ be the $n$-sphere and let $\mathbf{s}\in\mathbb{S}^n$ be a point on the it. Also, let $\mathcal{S}=\{\mathbf{s}_i\in\mathbb{S}^n\colon \mathbf{s}_i\neq \mathbf{s}, i=1,\ldots,N\}$ be a set of $N$ point on the $n$-sphere different…
2
votes
1 answer

Averaging over Mahalanobis distance vectors of different clusters

Given vectors from two different clusters (in particular in my example from two different experimental conditions, called "CS" and "US") where the Mahalanobis Distance is calculated according to: $M^2 = (x-\mu)^T \Sigma^{-1}(x-\mu)$ the explanation…
Pugl
  • 321
2
votes
0 answers

Convert a vector of distances to a normalized vector of similarities

I'm struggling to find a way to solve this problem. I have derived a $m \times n$ matrix containing in each row the Mahalanobis distance from a certain centroid. So at the end I have $m$ rows each expressing the distance of that variable from $n$…
2
votes
1 answer

Hessian matrix of the mahalanobis distance wrt the Cholesky decomposition of a covariance matrix

I'm stuck with the following problem: I have to compute the second derivative (hessian matrix) of the mahalanobis distance $$ [x-\mu]^{T} \Sigma^{-1} [x-\mu] $$ wrt to the Cholesky decomposition of the covariance matrix $$ \Lambda\Lambda^{T}=\Sigma…
1
vote
0 answers

Interpretation of Mahalanobis distance: why not two inverses?

In this question, there's an informal answer that gives an intuition to the Mahalanobis distance. From my understanding, the Mahalanobis distance first transforms the vector, using the inverse of the covariance matrix $\Sigma^{-1}$, to map it into…
1
vote
1 answer

Mahalanobis distance with inner product

The Euclidean distance can be formulated like: $I_{xy}=\sqrt{||x||^2+||y||^2-2||x||||y||c_{xy}}$ where $c_{xy}=\left$ is the inner product. Now, I'd like to formulate the Mahalanobis distance with the $c_{xy}$ inner product. I know that…
user12910
  • 123
  • 3
1
vote
1 answer

Calculating Mahalanobis distance

I am slightly confused as to how you calculate Mahalanobis distance given a set of data. I have tried asking my tutor for help but he does not seem interested in helping what so ever and I am continuously insulted. I thought I would turn to the…
1
vote
1 answer

Mahalanobis distance for vectors from different distributions

Given that I want to calculate the distance of a vector x (say from the blue distribution) from the centroid of a different distributions than x's - say centroid of the red vectors: I want to use the Mahalanobis distance: $M^2 = (x-\mu)^T…
1
2 3 4