[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] Multidimensional linear fit (and principal component analysis
Philipp Klaus Krause
[Help-gsl] Multidimensional linear fit (and principal component analysis, covariance matrix)
Sat, 13 Dec 2008 21:53:21 +0100
Mozilla-Thunderbird 22.214.171.124 (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
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
- [Help-gsl] Multidimensional linear fit (and principal component analysis, covariance matrix),
Philipp Klaus Krause <=