Questions tagged [mahalanobis]

38 questions
7
votes
2 answers

Is there a version of the Mahalanobis distance for matrices?

I'm working on a computer vision problem and I want to use the Mahalanobis distance to cluster image patches (2D matrices having the same dimensions). I haven't been able to find any generalisation up to this point and would prefer not to vectorise…
vphenix
  • 507
  • 2
  • 13
5
votes
2 answers

What are the pros and cons of using mahalanobis distance instead of propensity scores in matching

I learned about this option of using mahalanobis distance instead of PS to do matching from the matchit() function in R. It seems a more nonparametric approach. Could you state its pros and cons and in what situation it is suitable?
5
votes
2 answers

Something like Mahalanobis distance when the copula is not Gaussian

Mahalanobis distance accounts for different variances of the marginal variables and correlations between the marginal variables. However, there is an implicit (maybe explicit) assumption that correlation is the right measure of dependence between…
Dave
  • 28,473
  • 4
  • 52
  • 104
4
votes
1 answer

Multivariate Chebyshev's inequality with Mahalanobis distance

In Chebyshev's inequality, we can generalize the 68-95-99.7 rule from normal distributions to bound how much density is within a certain number of standard deviations from the…
4
votes
0 answers

the Chi-squared distribution and Mahalanobis

I'm doing some simulations in C++ and OpenGL (2D and 3D) for navigating a robot in unknown environment known as SLAM. I'm using Extended Kalman filter as an optimal estimator. In SLAM problem, once the robot detects a beacon (aka landmark or…
3
votes
1 answer

What is the covariance matrix of the normal order statistics?

I would like to test if a sample comes from a standard normal distribution. I want to do that by sorting the sample values, and measuring the Mahalanobis distance to the expected order statistics from this distribution. To compute the Mahalanobis…
2
votes
0 answers

About the calculation of covariance matrix in mahalanobis distance: How $W^TW$ is equal to the covariance matrix?

I was reading about deep metric learning (from here) and came across the mahalanobis distance. I understood why we can not use euclidean distance if the distribution is not isotropic (the covariance between dimensions of our data is not 0, so they…
2
votes
3 answers

How to find the variance(s) of a bivariate normal density such that 95% of the mass is within a certain radius from the mean defined by a point A?

I would like to find the variance of a bivariate normal density (BND), centered at the mean M, such that 95% of its mass is within a certain radius, which depends on the position of a point, A. (Note: In this toy example, the variances are equal and…
Emy
  • 290
  • 1
  • 9
2
votes
1 answer

How to determine an appropriate "closeness" threshold when matching for causal inference?

Say I have a [yes/no] treatment variable (e.g. the customer complained about their order) and I want to estimate the causal impact of this "treatment" on the average customer's future spend. To do so, I match tens of thousands of observations in…
2
votes
1 answer

Why does this formula produce $p_{2}$ probabilities for Mahalanobis distances?

At the IBM website it is written that The p1 probabilities are standard probabilities of an observation from a multivariate normal distribution being that far or further from the centroid, which are based on a cumulative central chi-squared …
2
votes
2 answers

Understanding the R stats mahalanobis() function's Output

An acquaintance recommended I use the Mahalanobis distance on my data instead of Euclidean, Manhattan, etc. I tried using the mahalanobis() function in the R stats package on a data matrix with N samples and p features, with the p features as rows…
lrthistlethwaite
  • 535
  • 2
  • 16
2
votes
2 answers

Mahalanobis Distances Critical Values (Chi-Squared?)

Say I work out the mahalanobis distance 'D' to measure the separation between two objects (which aren't normally distributed). Say I now want to use 'D' against some critical values to decide if it's an outlier or not. I've read that using…
Yesiifi
1
vote
0 answers

Distance defined by second moment, akin to Mahalanobis distance?

In ordinary linear regression ($c=0$) and ridge regression ($c > 0$), for design matrix $X$ with dimensions $N$ observations by $D$ dimensions, the $N \times N$ hat matrix is given by: $$H = X (X^T X + c I)^{-1} X^T$$ If we consider the $ij$-th…
Rylan Schaeffer
  • 689
  • 3
  • 10
1
vote
1 answer

Mahalanobis Distance question in r

I have a question when calculating Mahalanobis Distance using R. For the Mahalanobis distance function below: mahalanobis(x, center, cov, inverted = FALSE, ...) The center in the function above should be the mean vector of the distribution (as…
Rach_L
  • 15
  • 4
1
vote
1 answer

Is there an intuition about the matrix operations in the exponent of the multivariate normal distribution?

In the exponent of the multivariate distribution, there are 2 vectors and a square matrix multiplied together to get a scalar result: $$(\mathbf{x} - \mu)^{\text{T}}\Gamma^{-1}(\mathbf{x} - \mu)$$ where $\Gamma$ is the covariance matrix of random…
1
2 3