3 462.876649 480.411218 281.758307 480.411218 513.015646 278.914813 281.758307 278.914813 336.326645
The output will be K groups of lines; each group will have the format:
E real part imaginary part relative importance V real part imaginary part ... K lines ... N real part imaginary part ... K lines ... W real part imaginary part ... K lines ...The E line is the eigen value. The V lines are the eigen vector associated with E. The N lines are the V vector normalized to have a magnitude of 1. The W lines are the N vector multiplied by the square root of the magnitude of the eigen value (E).
For the example input matrix above, the output would be:
E 1159.7452017844 0.0000000000 88.38 V 0.6910021591 0.0000000000 V 0.7205280412 0.0000000000 V 0.4805108400 0.0000000000 N 0.6236808478 0.0000000000 N 0.6503301526 0.0000000000 N 0.4336967751 0.0000000000 W 21.2394712045 0.0000000000 W 22.1470141296 0.0000000000 W 14.7695575384 0.0000000000 E 5.9705414972 0.0000000000 0.45 V 0.7119385973 0.0000000000 V -0.6358200627 0.0000000000 V -0.0703936743 0.0000000000 N 0.7438340890 0.0000000000 N -0.6643053754 0.0000000000 N -0.0735473745 0.0000000000 W 1.8175356507 0.0000000000 W -1.6232096923 0.0000000000 W -0.1797107407 0.0000000000 E 146.5031967184 0.0000000000 11.16 V 0.2265837636 0.0000000000 V 0.3474697082 0.0000000000 V -0.8468727535 0.0000000000 N 0.2402770238 0.0000000000 N 0.3684685345 0.0000000000 N -0.8980522763 0.0000000000 W 2.9082771721 0.0000000000 W 4.4598880523 0.0000000000 W -10.8698904856 0.0000000000
In general, the solution to the eigen system results in complex numbers (with both real and imaginary parts). However, in the example above, since the input matrix is symmetric (i.e., inverting the rows and columns gives the same matrix) the eigen system has only real values (i.e., the imaginary part is zero). This fact makes it possible to use eigen vectors to perform principle component transformation of data sets. The covariance or correlation matrix of any data set is symmetric and thus has only real eigen values and vectors.
(echo 3; r.covar map.1,map.2,map.3 | grep -v "N = ") | m.eigensystem
Then, using the W vector, new maps are created:
r.mapcalc "pc.1 = 21.2395*map.1 + 22.1470*map.2 + 14.7696*map.3" r.mapcalc "pc.2 = 2.9083*map.1 + 4.4599*map.2 - 10.8699*map.3" r.mapcalc "pc.3 = 1.8175*map.1 - 1.6232*map.2 - 0.1797*map.3"
The equivalent i.pca command is:
i.pca in=spot.ms.1,spot.ms.2,spot.ms.3 out=spot_pca
Last changed: $Date: 2017-04-29 22:09:01 +0200 (Sat, 29 Apr 2017) $
Available at: m.eigensystem source code (history)
Main index | Miscellaneous index | Topics index | Keywords index | Graphical index | Full index
© 2003-2018 GRASS Development Team, GRASS GIS 7.4.1svn Reference Manual