Questions tagged [mahalanobis]

A dissimilarity metric to compute distance between a point and a distribution.

Learn more about the Mahalanobis distance on Wikipedia


Tag usage

Questions on should be about implementation and programming problems, not about the statistical or theoretical properties of such metric.
Consider whether the question might be better suited to Cross Validated, the StackExchange site for statistics, machine learning and data analysis.

96 questions
1
vote
1 answer

The most efficient way to processing images (mahalanobis distances)

I've written a script based on this description. There are few images as 2D numpy arrays, if images are big, it takes a long time to calculate each values. Is there better way do do this than my solution? Consider three images, means vector and…
dmh126
  • 257
  • 5
  • 15
1
vote
1 answer

Mahalanobis distance between profiles in R

A sample of 100 subjects responded to two personality tests. These tests have slightly different wordings but are generally the same, i.e. they both measure the same 4 attitudes. Therefore, I have 2 matrices like this, with 4 scores per…
achmed
  • 35
  • 4
1
vote
0 answers

Removing multivariate outliers after using robust Mahalanobis distance

I have a data set of 167 observations of 3 variables. I am trying to assess and remove multivariate outliers using the robust Mahalanobis distance. To do this I have been playing around with the Moutlier function from the chemometrics package. I am…
1
vote
1 answer

New outliers appear after I remove existing ones using QQ Plot Results

I'm working on the PCA section from Michael Faraway's Linear Models with R (chapter 11, page 164). PCA analysis is sensitive to outliers and the Mahalanobis distance helps us identify them. The author checks for outliers by plotting the…
matsuo_basho
  • 2,833
  • 8
  • 26
  • 47
1
vote
1 answer

Mahalanobis distance in Matlab

I would like to calculate the mahalanobis distance of input feature vector Y (1x14) to all feature vectors in matrix X (18x14). Each 6 vectors of X represent one class (So I have 3 classes). Then based on mahalanobis distances I will choose the…
1
vote
0 answers

Parrallel mahalanobis raster classification in R

I'm looking for the most efficient way to classify raster using Mahalanobis distance to class. My classes are already summarised by mean and covariance. So far, I'm tansfmorming my 6 bands input stacks image as a data frame and I'm then using the…
Wraf
  • 747
  • 2
  • 10
  • 24
1
vote
1 answer

Mahalanobis distance with multiple observations per group

I'd like to calculate the Mahalanobis distance among groups of species where: i) there are more than two groups (more than two species). ii) there are multiple variables (features of such species) to be taken into account. iii) there are multiple…
Andre Silva
  • 4,782
  • 9
  • 52
  • 65
1
vote
2 answers

Euclidean and Mahalanobis classifiers always return same error for each classifier?

I have a simple matlab code to generate some random data and then to use a Euclidean and Mahalanobis classifier to classify the random data. The issue I am having is that the error results for each classifier is always the same. They both always…
KDecker
  • 6,928
  • 8
  • 40
  • 81
1
vote
0 answers

Confidence intervals for Mahalanobis distance

Can anyone give a working example on how to compute confidence intervals for mahalanobis distance (MD)? I am using R and here is a sample dataset that I use. I am interesting in computing the MD between these two matrices. #define…
mindlessgreen
  • 11,059
  • 16
  • 68
  • 113
0
votes
0 answers

Understanding Mahalanobis distance between ECG beats

I have a dataframe where each row represents a 200-dimensional ecg beat. I have a lot of noisy ecg beats (rows), and so I want to calculate Mahalanobis distance of each beat with its average beat (each row and average row) and identify beats (rows)…
Kathan Vyas
  • 355
  • 3
  • 16
0
votes
0 answers

Mahalanobis distance in fastslam?

I'm very new to slam in general. I have a question regarding if the Maximum likelihood methods in the fastslam algorithm utilise mahalanobis distance, because according to this text: http://robots.stanford.edu/papers/Thrun03g.pdf , it states at page…
EyedBread
  • 11
  • 3
0
votes
0 answers

Is there a R function to run the Mahalanobis Distance in loop?

As titled, my friend and I are taking the advanced quantitative course, and we run into a dataset where we are asked to run the Mahalanobis Distance (MD) after creating a moderation interval. That became a long journey of running the MD and…
Hieru
  • 1
0
votes
0 answers

Calculate Mahalanobis distance of one dataset from the covariance of another dataset?

I would like to know if there is anyway to calculate the Mahalanobis distance of each observations in one dataset based on the covariance of another dataset in Python. Most of the internet search gives me the answers to calculate within the same…
0
votes
1 answer

Pairwise Mahalanobis Distance Between Multiple Independent Variables and a Dependent Variable With Three Classes in R

Issue I'm having some trouble calculating the Mahalanobis Distance between three classes of the independent variable Country. My aim is to calculate the Mahalanobis distance among dolphin whistle acoustic parameters measured from a spectrogram taken…
0
votes
1 answer

Mahalanobis difference by group with dplyr

I want to get a Mahalanobis difference for each set of two scores, after being grouped by another variable. In this case, it would be a Mahalanobis difference for each Attribute (across each set of 2 scores). The output should be 3 Mahalanobis…
eartoolbox
  • 327
  • 2
  • 10