[Top][All Lists]

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

[Help-gsl] Multidimensional linear fit (and principal component analysis

From: Philipp Klaus Krause
Subject: [Help-gsl] Multidimensional linear fit (and principal component analysis, covariance matrix)
Date: Sat, 13 Dec 2008 21:53:21 +0100
User-agent: Mozilla-Thunderbird (X11/20081018)

I want to do a least squares fit of a line in 3 or 4-dimensional space
to 16 data points.
I looked at the manual, it seems gsl provides least squares linear fits
only for onedimensional stuff.
The classic way would be the principal component analysis (PCA), again
gsl does not provide this. PCA can be done by estimating the covariance
matrix and getting thet eigenvector for the biggest eigenvalue. gsl
seems to provide functions to get the eigenvalues and vectors, it even
sorts them for me. It might be a bit inefficient to calculate them all
when I need only the biggest, but that shouldn't be much of a problem.
However gsl seems to provide estimation of covariance only in one
dimension, so I would have to implement estimation of the covariance
matrix myself.
Is this correct? Will performance be okay for such small data sets (16
data points, in 3 or 4 dimensions) or is gsl optimized too much towards
"bigger" problems?


reply via email to

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