# Understanding Mahalanobis Distance And Its Use Cases

Advertisement

Last month, we celebrated the National Statistics Day to commemorate the 125th birth anniversary of India’s legendary statistician, PC Mahalanobis. His contributions to applied statistics are immense and he is best known for developing a statistical measure called Mahalanobis distance, which is used in multivariate regression analysis. Mahalanobis distance finds wide applications in the field of classification and clustering. In this article, we will explore the Mahalanobis distance (MD) and its significance in statistics.

### Regression Analysis In Statistics

Regression analysis is crucial in machine learning due to the fact that ML deals with errors and relationships in the data that goes into the model. This topic of statistics is widely used to study the variables that account in the project. ML models and algorithms sometimes analyse a variety of data to figure out a consistent output.

#### THE BELAMY

##### Sign up for your weekly dose of what's up in emerging technology.

In multivariate analysis, the data under a study’s consideration, is usually delineated into a number of variables. These variables have to denote a relationship with respect to a standalone variable for the study. Multivariate analysis helps in addressing this challenge through methods that use correlation (strength of relationship) between the variables.

### What Is Mahalanobis Distance?

Generally, variables (usually two in number) in the multivariate analysis are described in a Euclidean space through a coordinate (x-axis and y-axis) system. Suppose if there are more than two variables, it is difficult to represent them as well as measure the variables along the planar coordinates. This is where the Mahalanobis distance (MD) comes into picture. It considers the mean (sometimes called centroid) of the multivariate data as the reference.

The MD measures the relative distance between two variables with respect to the centroid. Therefore, farther the variable is from the centroid, the larger the MD is. The definition of the concept is given below.

The Mahalanobis distance of an observation x = (x1, x2, x3….xN)T from a set of observations with mean μ= (μ123….μN)T and covariance matrix S is defined as:

MD(x) = √{(xμ)TS-1 (xμ)

The covariance matrix provides the covariance associated with the variables (the reason covariance is followed is to establish the effect of two or more variables together).

### Uses And Applications

As mentioned earlier, MD is primarily used in classification and clustering problems where there is a need to establish correlation between different groups/clusters of data. Another application of MD is discriminant analysis and pattern analysis, which are based on classification.

It has also found relevance in principal component analysis (PCA), where the correlated variables are transformed to a set of uncorrelated variables called principal components. If the value of MD is squared, it is found that the sum of squares of all non-zero principal components are equal to that of MD. This is helpful to ascertain the right components based on the requirement in data analysis.

#### Use Cases Of Mahalanobis Distance

Image processing: The aspect of MD in image processing has spurred researchers to bring in this concept to serve various areas of the field. One such study is the anomaly detection in hyperspectral images, which are used to detect surface materials in the ground. A group of researchers from IEEE have developed a method called low-rank and sparse matrix decomposition-based Mahalanobis distance method for anomaly detection. This uses MD to detect the probable anomalies lying in the images analysed from sparse matrix decomposition.

Precision Medicine: A specific study in RNA sequencing has applied MD to analyse molecules to predict breast cancer survival. The researchers make use of MD to establish statistical significance of deregulated pathways in a subject’s transcriptome. Results show that the pathways derived from MD has improvement over previous research on the study, and offer better clinical interpretation of cancer survival.

Neurocomputing: Another research study incorporates MD in the detection of arrhythmia in an electrocardiogram (ECG). In this study, MD resolves the clustering problems associated with traditional Euclidean Distance (ED) observed in clustering features in ECG. The method followed is a Fuzzy C-means (FCM) clustering based on MD. Results obtained in the study show that ECG program iterations are reduced by almost 50 percent when MD-based FCM is used.

Physics: In Physics, Positron Emission Tomography (PET) is one specific area which finds application in medicine as well as in research, mainly in neuroimaging. One novel study implements MD to analyse gamma quanta by reconstructing signals in the energy levels, which is necessary for high-resolution images. The use of MD improves the image resolution significantly with better accuracy.

### Comments:

Mahalanobis Distance is a very useful statistical measure in multivariate analysis. Any application that incorporates multivariate analysis is bound to use MD for better results. Furthermore, it is important to check the variables in the proposed solution using MD since a large number might diminish the significance of MD.

## More Great AIM Stories

### Ontology In AI: A Common Vocabulary To Accelerate Information Sharing

I research and cover latest happenings in data science. My fervent interests are in latest technology and humor/comedy (an odd combination!). When I'm not busy reading on these subjects, you'll find me watching movies or playing badminton.

## Our Upcoming Events

Conference, in-person (Bangalore)
MachineCon 2022
24th Jun

Conference, Virtual
Deep Learning DevCon 2022
30th Jul

Conference, in-person (Bangalore)
Cypher 2022
21-23rd Sep

### Discord Server

Stay Connected with a larger ecosystem of data science and ML Professionals

### Telegram Channel

Discover special offers, top stories, upcoming events, and more.

#### Subscribe to our newsletter

##### Ireland gets its first AI ambassador. Will other countries follow suit?

India is behind the US, China, the UK, France, Japan and Germany in the top AI adopters list.

##### Twitter former CEO Maheshwari allegedly threatened his Invact Metaversity co-founder

“I never invested to be used as an instrument of a co-founder bullying the other one,” Orosz said in the email.

##### Allen Institute for AI introduces new benchmark for computer vision models

GRIT is an evaluation only benchmark for evaluating the performance of vision systems across several image prediction tasks, concepts, and data sources.

##### Why is Broadcom acquiring VMWare?

Following the closing of the transaction, the Broadcom Software Group will rebrand and operate as VMware.

##### PayPal to have over 800 job openings in India: Chandramouliswaran V

We have close to 1000 positions that are open, and we look to hire laterally across all levels.

##### WhatsApp Business on a mission to lure Indian enterprises

WhatsApp Business is among the 30 most downloaded apps in India, beating the likes of Jio Saavn and Wynk.

##### NIT Calicut launches AI for cancer initiative

Listen to this story The National Institute of Technology Calicut (NITC) and MVR Cancer Centre

##### Startup’s loss is IT’s gain

Around 40-50 per cent of employees are leaving startups and are getting absorbed by IT companies.

##### AWS launches all-new GPU-based instances for ML training and HPC

The all-new P4de instances are 2x higher than current GPUs.

##### The never-ending debate on AGI

DeepMind’s AlphaGo is one of the biggest success stories in AI.