Zaretto / libsquish

Automatically exported from code.google.com/p/libsquish
MIT License
1 stars 1 forks source link

Optimisation suggestion: use cheaper principle compent calculation #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Suggested by Rich Geldreich of Ensemble Studios:

"Candid Covariance-Free Incremental Principal Component Analysis"
http://www.cse.msu.edu/~weng/research/CCIPCApami.pdf

Original issue reported on code.google.com by sidm...@gmail.com on 11 Sep 2008 at 7:08

GoogleCodeExporter commented 9 years ago
A cheap alternative is the power method:

http://code.google.com/p/nvidia-texture-tools/source/browse/trunk/src/nvtt/squis
h/maths.cpp#63

Original comment by cast...@gmail.com on 21 Nov 2008 at 10:29

GoogleCodeExporter commented 9 years ago
Interesting that these approximations reduce RMS... perhaps the current 
eigenvalue
stuff is bugged.

Thanks for the pointer to your http://en.wikipedia.org/wiki/Power_method
implementation Ignacio.  I assume the max (vs norm) is just for speed?  I think 
the
code could be further improved by using the existing SIMD classes, I'll take a 
look
(hopefully this evening).

Original comment by sidm...@gmail.com on 3 Apr 2009 at 7:56

GoogleCodeExporter commented 9 years ago
Looks like a win, SIMD version is submitted.  I'll kill the old code before 
release,
once I know the final RMS error differences between the releases.

Original comment by sidm...@gmail.com on 3 Apr 2009 at 10:51

GoogleCodeExporter commented 9 years ago
Yes, note that the eigenvectors can have arbitrary scale, the normalization is 
just
to keep them at a reasonable scale, so you can just use maximum-norm.

Original comment by cast...@gmail.com on 3 Apr 2009 at 10:53