[GRASS-dev] Reg i.pca output

Markus Metz markus.metz.giswork at gmail.com
Tue Mar 26 03:28:40 PDT 2013


On Tue, Mar 26, 2013 at 10:25 AM, Rashad M <mohammedrashadkm at gmail.com> wrote:
>
>
>
> On Tue, Mar 26, 2013 at 2:44 PM, Markus Metz <markus.metz.giswork at gmail.com>
> wrote:
>>
>> On Tue, Mar 26, 2013 at 8:39 AM, Rashad M <mohammedrashadkm at gmail.com>
>> wrote:
>> > Hi,
>> >
>> > i.pca creates 6 raster maps for 6 input raster
>> >
>> > eg:
>> >
>> > i.pca
>> >
>> > in=lsat7_2002_10,lsat7_2002_20,lsat7_2002_30,lsat7_2002_40,lsat7_2002_50,lsat7_2002_70
>> > \
>> >     out=lsat7_2002_pca
>> >
>> >
>> > I have a doubt here
>> >
>> > Does the output lsat7_2002_pca.1 is the corresponding map for
>> > lsat7_2002_10?
>>
>> No. lsat7_2002_pca.1 contains the principal component with the highest
>> eigenvalue and is calculated using all input bands. More generally,
>> each lsat7_2002_pca.* map is calculated using all input bands. Look at
>> the eigenvectors to find out the weights with which each input map
>> contributes to a specific PCA.
>>
>
> So by knowing a pixel value of lsat7_2002_pca.1 can I get the value before
> transformation in PCA.
> consider this:
> I have two bands B1,B2 and after i.pca I get PC1,PC2. Then is there a way to
> derive value of X,Y where X belongs to B1 and Y belongs to B2 by only
> knowing P,Q
> where P belongs to PC1 and Q belongs to PC2
>
> and also X,Y and P,Q are of same index (row,col)

X = P * eigenvector(P, X) + P * eigenvector(Q, X) + mean(B1)

Using the example from the manual:

X = 0.2824 * PC1 + 0.2541 * PC2 + 0.3801 * PC3 +  0.1752 * PC4 -
0.6170 * PC5 - 0.5475 * PC6 + mean(band 1)

Markus M

>
> I hope this is clear
>
>>
>> Markus M
>>
>> >
>> > If so the lsat7_2002_10_pca.1 contains PCA transformed pixel for
>> > lsat7_2002_10
>> >
>> > Is this correct?
>> >
>> > --
>> > Regards,
>> >    Rashad
>> >
>> > _______________________________________________
>> > grass-dev mailing list
>> > grass-dev at lists.osgeo.org
>> > http://lists.osgeo.org/mailman/listinfo/grass-dev
>
>
>
>
> --
> Regards,
>    Rashad


More information about the grass-dev mailing list