help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] gsl and Mahalanobis distance (without LU decomposition and in


From: Tomas Hudik
Subject: [Help-gsl] gsl and Mahalanobis distance (without LU decomposition and inversion)
Date: Mon, 20 Aug 2007 18:00:44 +0200

Hi there,

I have to compute a lot of Mahalanobis distances, therefore I'm looking
for very fast solution.

Equation for Mahalanobis distance is: M(x) = sqrt( (x-m)^T x C^(-1) x (x-m) )
where x is an example (n dimensional vector), m is mean, C^(-1) is inverse
covariance matrix (also n-dimensional).

I'd like to know, if it is possible to somehow  avoid inverse matrix computing
(functions : gsl_linalg_LU_decomp() and gsl_linalg_LU_invert() ).

As we know the covariance matrix is symmetric and positive definite, therefore
we can decompose it by gsl_linalg_cholesky_decomp (gsl_matrix * A).
Is there any possibility how would be possible to use gsl_linalg_cholesky_solve?

Or, is there any other faster way how to compute Mhalanobis distance?
(without inverse matrix by LU decomposition)

Thanks, any help is appreciated, Tomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]