[GRASS-user] Inverse PCA in GRASS

Dylan Beaudette dylan.beaudette at gmail.com
Thu Jan 24 13:25:52 EST 2008


On Thursday 24 January 2008, Markus Neteler wrote:
> HamishB wrote:
> > Michael Perdue wrote:
> >> I think what your asking is if anyone knows how to apply the
> >> transformation matrix that was used to derive you pca components in
> >> reverse to get back to the original coordinate system. Something like
> >> what is done in a decorrelation stretch?
> >> Hopefully someone more knowledgeable than I can elaborate, but the
> >> general idea is as follows;
> >>
> >> if the i.pca is capable of divulging the eigenvectors, you can use
> >> r.mapcalc to apply them in reverse. else;
> >>
> >> r.covar -> m.eigensystem -> mapcalc -> "do something with your
> >> principal components" -> mapcalc (inverse rotation) -> "original
> >> coordinate system"
> >>
> >> You can take a look at the bottom of the r.covar page for more info.
> >> The big "if" is on the status of m.eigensystem. I tried the link to
> >> the manual page and it is broken so I'm unsure of it's status.
> >
> > m.eigensystem has not been ported from GRASS 5 to GRASS 6.
> >
> > It is available from the GRASS 5 source code:
> >   grass-5.4.0/src.contrib/CERL/misc/m.eigensystem/
> >
> > online:
> >
> > http://freegis.org/cgi-bin/viewcvs.cgi/grass/src.contrib/CERL/misc/m.eige
> >nsystem/
> >
> >
> > While it is written in Fortan77 I see no reason why it couldn't be
> > compiled with g77 or gfortran and run with modern versions of GRASS.
> > The GRASS raster/imagery engines and file formats have not changed since
> > GRASS 5 so there shouldn't be many problems.
> >
> > FWIW ./configure still checks for f2c.h
>
> I have added m.eigensystem to GRASS Addons SVN with a slightly
> updated Makefile. Grab here:
> http://trac.osgeo.org/grass/browser/grass-addons/m.eigensystem
>
> or from SVN
> http://trac.osgeo.org/grass/wiki/DownloadSource
> -> Subversion GRASS Addons source code repository
>
> Markus

Nice. Is this scheduled to be included as a standard module, or is that 
pending some user tests?

thanks,

Dylan

-- 
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341


More information about the grass-user mailing list