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: Sun, 14 Sep 2008 21:18:37 -0400
Organization: The MathWorks, Inc.
Lines: 7
Message-ID: <gakd5d$khh$1@fred.mathworks.com>
References: <g999ca$lao$1@fred.mathworks.com> <g9jubp$pkv$1@fred.mathworks.com> <gajp6p$9eb$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 1221441517 21041 172.31.57.88 (15 Sep 2008 01:18:37 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 15 Sep 2008 01:18:37 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
In-Reply-To: <gajp6p$9eb$1@fred.mathworks.com>
Xref: news.mathworks.com comp.soft-sys.matlab:490210



Dilber Ayhan wrote:
> Hi,
> 
> as a second question, is multicollinearity prevented by using QR decomposition in mahal function? I knew it works, but using my data set, mahal function did not solve with mahal function and gave an error as "the matrix is singular"
> since there is multicollinearity (since correlation matrix includes 1s)

There may be a standard or unique or useful way to define the Mahalanobis distance for a singular cov matrix, but I'm not familiar with it.  You could perhaps compute a distance along the degenerate subspace using a reduced cov matrix; MAHAL does not do that.