Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.stat.math.independent

Topic: LU decomposition and Mahalanobis distance
Replies: 2   Last Post: Jul 3, 2006 2:44 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Ross Clement

Posts: 569
Registered: 12/8/04
LU decomposition and Mahalanobis distance
Posted: Jul 3, 2006 11:02 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Dear all,

I am currently using a library (gnu gsl) which takes great pains in
both API design and documentation to guide people away from using
matrix inverses explicitly and towards using the LU decomposition. I
have code which is going to calculate Mahalanobis distance, requiring
the inverse of covariance matrix. Is there any reason to use a LU
decomposition in calculating Mahalanobis distance? At present I'm a
little bit skeptical, as I will invert a (say 100x100) covariance
matrix once, then calculate *many* M distances. While I don't know
exactly how to formulate Mahalanobis distance using the LU
decomposition, or even know if it's possible (googling on both yields
nothing that obviously answers my question), I would presume that any
rewrite would require additional computation and therefore time. Would
there be a significant improvement in numerical accuracy? At present my
default inclination is to find the actual inverse and then calculate
distance by the standard formula.

Also, I have to solve some systems of linear equations. But the gsl
libray includes library routines to do this given a LU decomposition,
so unless corrected I'm assuming it's a no-brainer to solve them using
a LU decomposition.

Any comments/corrections/pointers?

Thanks in anticipation,

Ross-c




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.