0

First post here so please be easy on me.

I have an application where I have one data point in high dimensions, represented by an $m \times n$ matrix. Call it $X_1$. And I have to compare this data point to many other data points of the same dimension, call them $X_k$ where $k\in \{2,3...,z\}$, give each comparison a score, and then choose the $X_k$ that is most similar ( closest to ) to $X_1$. The way I am currently implementing this score is just the Euclidean distance (Frobenius Norm). Let $s_k$ be the score,

$$s_k = ||X_1-X_k||_F$$

So now I am taking a class where we are looking at many different distance measures. I know my data set has some covariance structure in it, not IID, so it has come up that perhaps a better way of looking at distance is with the Mahalanobis distance, which normalizes the distance from the mean using the covariance matrix, so that distances are relative their positions along the principal components. Here $\hat{x}$ and $\hat{\mu}$ are vectors representing the data point and the mean of the distribution.

$$D_M=\sqrt{(\hat{x}-\hat{\mu})C(\hat{x}-\hat{\mu})^T}$$

My question here is: can I use the theory of the Mahalanobis distance with my scoring function instead of using the Frobenius norm?

The issues I see are that the Mahalanobis distance is not measuring a pairwise but instead the distance from a point to the mean of the distribution. Another issue I see is that my data points are 2-dimensional matrices and the Mahalanobis distance is implemented on vectors.

Thanks

  • I am a bit confused about your notation. Is your observation at a single time point $k$ a matrix of size $m \times n$ or a vector of size $m \times 1$? – Maxtron Nov 15 '19 at 15:46
  • You can always convert your data point from a matrix to a vector using reshape function in MATLAB. So, each data point will be an $mn \times 1$ vector. – Maxtron Nov 15 '19 at 15:52
  • @Maxtron the observation is in the form of an $m \times n$ matrix. So you can directly calculate frobenius norm using the matrix. So considering I would "flatten" the matrix, how would I use the $D_M$ to compute the distance between points, since it seems $D_M$ by definition only gives you the distance from any point to the mean of the distribution? The question is if we can somehow use the same theory to compute these "pairwise" distances instead of distance to the center? – jeffery_the_wind Nov 15 '19 at 17:33

0 Answers0