Path: news.mathworks.com!not-for-mail
From: Peter Perkins <Peter.PerkinsRemoveThis@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Mahalanobis Distance Calculation
Date: Mon, 05 Jan 2009 12:21:19 -0500
Organization: The MathWorks, Inc.
Lines: 11
Message-ID: <gjtfig$ip4$1@fred.mathworks.com>
References: <g999ca$lao$1@fred.mathworks.com> <g9jubp$pkv$1@fred.mathworks.com> <gaj9po$1p5$1@fred.mathworks.com> <gakcru$h5o$1@fred.mathworks.com> <gjre3i$3cr$1@fred.mathworks.com>
NNTP-Posting-Host: perkinsp.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: fred.mathworks.com 1231176080 19236 172.31.57.88 (5 Jan 2009 17:21:20 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 5 Jan 2009 17:21:20 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.18 (Windows/20081105)
In-Reply-To: <gjre3i$3cr$1@fred.mathworks.com>
Xref: news.mathworks.com comp.soft-sys.matlab:509868


Dilber Ayhan wrote:
> Hi Peter,
> 
> in the calculation of MD, the values of Y should be standardized, since it is encouraged. This means;
> 
> Z=(Y-M)/stdev should be used with covariance function
> But in the mahal function it isnot divided by standard deviation of Y values?If we want to use matlab mahal function, should we add this in to the formula, or it is already added?
> 
> Can you just explain this?

Dilber, I'm not sure what you mean.  There's a standard formula for the Mahalanobis distance; my original reply transforms that from a textbook formula into a computationally useful one.  You may be referring to the fact that I used the notation Y0 to refer to a "centered" version of Y, but neglected to explain that notation.  If you want to compute the MD by also standardizing with respect to variance, and then using the correlation matrix, that's would be perfectly reasonable and equivalent.  But that isn't what you've described above.