[GRASS-dev] i.cca eigenvector computation strangeness

Soeren Gebbert soerengebbert at googlemail.com
Mon Aug 17 15:37:43 EDT 2009


Hi,
while including the ccmath library into grass and
patching i.cca to use the new ccmath library eigen vector functions,
i noticed, that the eigen vector computation of the original i.cca version
differs from the expected values?

First, the i.cca code looks wired. Like Fortran code ported to C while
keeping the
fortran style of counting (starting from 1). I reomved the Fortran coding
style and replaced
the eigen vector computaion function from lib/gmath/jacobi.c with a ccmath
version.
As a side effect: it is now possible to compute a cca of subgroups of size
much larger than 8.

I verified the new eigen vector compuation of i.cca (the ccmath version)
with octave, so
octave and i.cca computing now the same eigen vecotors for a given matrix.
But this eigen vecotrs differ from the original version of i.cca. The
difference is in the
sign of the vectors. And therefore the results of i.cca are looking
different.

Example:

The following steps are made with the original and the ccmath version of
i.cca:

i.group group=LandSat
input=LandsatTM_Blue,LandsatTM_Green,LandsatTM_IR1,LandsatTM_IR2,LandsatTM_IR3,LandsatTM_Red
i.group group=LandSat subgroup=visible
input=LandsatTM_Blue,LandsatTM_Green,LandsatTM_Red
i.cluster group=LandSat subgroup=visible sigfile=sig.txt classes=4
i.cca --v group=LandSat subgroup=visible signature=sig.txt output=test_cca
r.info -r test_cca.1
r.info -r test_cca.2
r.info -r test_cca.3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20090817/623ceffe/attachment.html


More information about the grass-dev mailing list