Questions tagged [mahalanobis-distance]

Question that relates or uses the Mahalanobis distance metric.

Filter by
Sorted by
Tagged with
0
votes
1answer
21 views

Instability in Calculating Mahalanobis Distance

I am trying to calculate Mahalanobis distance from a point to a cluster of points. The code below does that. ...
0
votes
0answers
8 views

Shortest mahalanobis distance for point on ray

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 }})^...
0
votes
0answers
31 views

When mean corrected matrix $X_c = UΛV^T$, how to use this singular value decomposition to prove its three spatial properties?

We use the singular value decomposition on a mean corrected data matrix. $X_c = \begin{bmatrix}(x_1-x̄)^T\\(x_2-x̄)^T\\⋮\\(x_n-x̄)^T\end{bmatrix} = UΛV^T$, Let $\sqrt{n-1}U = (\dfrac{x_c\hat{e_1}}{\...
0
votes
4answers
60 views

What does the $\sum^{-1}$ mean in “$(x-\mu)^T\Sigma^{-1}(x-\mu)$”?

In the following multivariate normal distribution formula the $\sum^{-1}$ seems very unintuitive. Is $(x-\mu)^T\Sigma^{-1}(x-\mu)$ the same as $\Sigma(x-\mu)^2$? If not, what is it and why? ...
1
vote
0answers
25 views

What is a useful distance metric (euclidean?) if I want to compare different amounts of attributes depending on the instance being compared?

Imagine that I have a data set with 15 examples, and each has 100 attributes. I want to use these 15 examples to classifiy unseen examples based on the similarity/distance between them. The ...
0
votes
0answers
10 views

Solving for a point where Mahalanobis distances are equal

I am trying to find a general solution for $x$ in the equation $$ (x-\mu_1)^T\Sigma_1^{-1}(x-\mu_1)=(x-\mu_2)^T\Sigma_2^{-1}(x-\mu_2) $$ where $x,\mu$ are vectors, and $\Sigma$ is the covariance ...
0
votes
1answer
20 views

Running race problem(logic)

There are 3 persons named Ram,Shyam and Hari (Yeah,Indian names). In an 100 m race Ram defeats Shyam by 15 m. In another race of 100 m, Hari defeats Shyam by 20 m. If Ram and Hari take part in a 150 m ...
0
votes
0answers
49 views

Can somebody explain me the intution behind this equation?

Can somebody explain me the name and/or intuition behind this equation? dm(A,B)=max{∥(A−B)x∥:x∈Rn,∥x∥=1} Kindly refer the equation here: Distance/Similarity ...
0
votes
0answers
14 views

How to calculate the mahalanobis distance of a series of 50 x 2 contours

I have a series of 2d closed curves which are all 50 x 2 on the plane. I wonder how to calculate the mahalanobis distance for these series of contours. For vectors, I can imagine how to calculate ...
0
votes
1answer
78 views

Story Mathematics [duplicate]

A man usually rides his bike $9$ kilometers per hour, yet the wind slows him to $6.76$ kilometers for $26$ minutes and $5.55$ for $10$; how long until he gets home $11.54$ kilometers away? (This was a ...
1
vote
0answers
73 views

Calculating Mahalanobis parameters from x data

Roughly speaking, the Mahalanobis distance $d(x) = \sqrt{(x - \mu)^T * \Sigma^{-1} * (x - \mu)}$ is the distance between a multivariate Gaussian distribution ($\mu$, $\Sigma$) and a point. If the ...
0
votes
1answer
14 views

Encoding the position information in real distance metric

The Euclidean distance doesn't preserve the exact position information. For example, the distance of the points (3,1) and (1,3) would be the same from the origin. Is there any distance metric which ...
1
vote
1answer
402 views

Proof That the Mahalanobis Distance is $\ge 0$

I was just introduced to the Mahalanobis distance between two vectors $\mathrm{\mathbf{X}}$ and $\mathrm{\mathbf{Y}}$ of random variables: $$|| \mathrm{\mathbf{X}} - \mathrm{\mathbf{Y}}||_{\Sigma} = (...
2
votes
0answers
22 views

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 ...
0
votes
2answers
83 views

How to find a covariance matrix of minimal volume including all data points by Mahalanobis distance?

Let $v_i$ be real vectors from $R^D$, for $i=0..N-1$. How to find a real symmetric positive-definite matrix $\Sigma$ so that $v_i^T \Sigma^{-1}v_i \leq 1$ for any $v_i$ and $det\ \Sigma$ is minimal? ...
0
votes
0answers
62 views

What is the Mahalanobis Distance pf y relative to the distribution of x?

I'm learning about the Mahalanobis Distance, and I had a question regarding an interesting problem: Let $x = \begin{bmatrix} x_1 \\ x_2 \end{bmatrix}$ be a Gaussian random vector with mean $\mu = \...
1
vote
0answers
120 views

About the convexity of distance metrc problems.

Suppose that we consider a pseudo-distance in $\mathbb{R}^n$ (so we admit that different points can have zero distance between them) that comes from a dot product. It is known that these distances ...
0
votes
1answer
282 views

Positive-definite matrix for positiveness in Mahalanobis distance

I am trying to prove that the Mahalanobis distance $d(x,y)$ is always positive, that is: $\forall{x,y \in E}\,{[0 \le d(x,y)]}$. To do so, I need to demonstrate that: $0\le\sqrt{(x-y)^TS^{-1}(x-y)}$, ...
1
vote
0answers
280 views

Mahalanobis whitening in a multivariate Gaussian kernel

I'm a biologist trying to understand math. It would help me out no end if somebody could clarify my misunderstandings. Question 1 is causing me the most grief. The image below is taken from the paper ...
1
vote
0answers
58 views

Average standardized distance between units?

Let $$ \pmb{X} = \begin{pmatrix} x_{11}& \cdots& x_{1j}& \cdots& x_{1p} \\ \vdots& & \vdots & & \vdots \\ x_{i1} & \cdots & x_{ij} & \cdots & x_{ip} \\ \...
5
votes
1answer
2k views

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{...
0
votes
1answer
541 views

Optimization problem with Mahalanobis distance

This question is a follow-up of one of my previous questions: Optimizing a vector equation Let $x$ and $b$ be two vectors of real numbers in k dimensional space. Let $W$ be a k-by-k matrix of real ...
0
votes
1answer
463 views

PDF of Mahalanobis distance of a multivariate random normal variable

Suppose $x$ is a multivariate normal random variable with mean $\mu$ and covariance matrix $C$. Let $h(x)$ be a the Mahalanobis distance of $x$ given by $h(x)=\sqrt{(x-\mu)^TC^{-1}(x-\mu)}$. Then how ...
0
votes
1answer
119 views

Composite cost function using angular distance between vectors and distance between points

I am trying to come up with a way to find the transformation parameters between two sets of planes and would like to get a cost function C which incorporates two ...
10
votes
1answer
654 views

“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}...
1
vote
4answers
89 views

distance from a sphere

My question is how far would I have to be away from a sphere to see it in its totally. Using a view of vision of 120 degrees. radius of 3.959 miles I am trying to work out how close an astronaut ...
0
votes
1answer
57 views

Space Time distance metrics

Am working to cluster in Space-Time, and thinking of Space Time metrics as follow: Distance(X,Y) = DistanceDiff**2 + coeff * TimeDiff**2 Am not sure if this is ...
0
votes
1answer
166 views

Billiard power and direction algorithm

Board clear Image Board with 2 sample shot Important: White ball and black ball are exactly one(1) pixle not bigger Hello. I want to write algorithm that computer play billiard and hit specific ...
1
vote
1answer
377 views

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 ...
0
votes
1answer
84 views

Finding similarity of strings using distance function : Bounding the distance function?

I want to know if 2 binary strings $s$ and $t$ each of $d$ length (dimension) and N = 2 (the alphebet) in this case 0 and 1 are similar to each other or not using the following distance function where ...
0
votes
1answer
55 views

distance travelled

A troop 5 metres long starts marching. A soldier at the end of the file steps out and starts marching at a higher speed. On reaching the head of the column , he immediately turns around and marches ...
0
votes
1answer
58 views

Calculate probability of distance for d-dimensional normal

Is there any simple way to calculate the probability of distance in the following form for d-dimensional normal distribution? $P(||\mathbf{x}-\mathbf{\mu}||^2>||\mathbf{x}-\mathbf{a}||^2)$, where $...
0
votes
1answer
196 views

Bhattacharya Distance on Distributions (Matrices) with Different Number of Variables (Dimensions)

We have two matrices, $A$ and $B$, representing two different probability distributions, with dimensions, $m*n$ and $k*n$, respectively. How can we calculate the Bhattacharya distance or another ...
0
votes
1answer
274 views

Bhattacharya Distance (or A Measure of Similarity) — On Matrices with Different Dimensions

We have a series of observations of different properties (such as heart rate or blood sugar level and others as well) across different days from different people from different geographical regions. ...
0
votes
0answers
506 views

Mahalanobis distance

Suppose there is a function $f$, for which we know the inequality $$f(r)\leq r$$ is true, where $r=||x-y||_2=\sqrt{(x-y)^T (x-y)}$ is the Euclidean distance. If now we use the Mahalanobis distance $...
0
votes
0answers
692 views

Optimize to Find the Mahalanobis Distance to Minimize the Term

I have an optimization problem defined as following: Assuming we have a data set $ { \left\{ \left( {x}_{i}, {y}_{i} \right) \right\}}_{i = 1}^{N} $ where $ {x}_{i} \in {\mathbb{R}}^{d} $ and $ {y}_{...
3
votes
1answer
2k views

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)$. ...