Shortest mahalanobis distance for point on ray

75 Views Asked by At

Given a 3x3 covariace matrix $S$ and the mean $\vec{\mu}$, the definition of the mahalanobis distance for a point $\vec {x} = (x_1,y_1,z_1)$ is:

${ D_{M}({\vec {x}})={\sqrt {({\vec {x}}-{\vec {\mu }})^{T}S^{-1}({\vec {x}}-{\vec {\mu }})}}}$

But, how do I find the point $\vec {x}$ with the shortest mahalanobis distance, given that it lies on a ray defined by origin $\vec {o} = (x_1,y_1,z_1)$ and direction $\vec {d} = (x_2,y_2,z_2)$?

Is this a known measure? Something like "mahalanobis distance for rays".

1

There are 1 best solutions below

0
On

The Mahalanobis distance between two vectors $x_i$ and $x_j$ is given by this formula:

$$ d_{ij}(x_i, x_j) = \sqrt{(x_i -x_j)^TS^{-1}(x_i -x_j)}$$

This formula can be used to measure how close are the two points to each other.

If you have $n$ points and you want to determine the closest point to a specific point, let's say the average of your data $\mu$, then you can calculate

\begin{split} d_{1}(x_1, \mu) &= \sqrt{(x_1 - \mu)^TS^{-1}(x_1 - \mu)}\\ d_{2}(x_2, \mu) &= \sqrt{(x_2 - \mu)^TS^{-1}(x_2 - \mu)}\\ &\;\;\vdots \notag \\ d_{n}(x_n, \mu) &= \sqrt{(x_n - \mu)^TS^{-1}(x_n - \mu)} \end{split}

The closest point to $\mu$ is the one that has the shortest distance.