LoginSignup
1
2

More than 5 years have passed since last update.

マハラノビス距離 まとめ

Posted at

What is the Mahalanobis' Distance

Main source

Mahalanobis' distance is the way of detecting outlier or changing point.
So how does it work?

It will go with 'correlation'.

For example,
'Sales of the umbrella' and 'precipitation(降水量)'has the correlation.
If the amount of precipitation increases, then the sales of the umbrella will increase too.
And, if I say the conclusion first, the ellipse(楕円) below is the Mahalinobis' distance.

Screen Shot 2017-06-08 at 17.02.45.png
Extracted from アングルトライ株式会社

If the point is inside the ellipse, the we can say that the point belongs to the same group.
However, if the point is outside the ellipse, then we can say that the point is the outlier.

How does the shape of ellipse determined?

As I said, the shape of ellipse will be determined by the correlation.

If the correlation is 1, that means that all the points will be on the one straight line. And if the correlation is 0, it means that the points will be dispersed everywhere.

Therefore, if the correlation is bigger, the ellipse will be more thin.

Screen Shot 2017-06-08 at 17.15.43.png
extracted from アングルトライ株式会社

What happens if the variable became more than 2 ?

In the example above, the variable was only 2 (Sales of the umbrella and precipitation).
But, even though the variables became more than 2, it still calculates according to possible pair combinations of variables.

For example, 3 variables A, B, C has 3 possible pair combination,
which are
A, B and A, C and B,C.

Thus, if there are 14 variables, the possible pair combination will be 91 and it will make 91 ellipses.

Screen Shot 2017-06-08 at 17.27.33.png
extracted from アングルトライ株式会社

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2