<div dir="ltr">That worked.<div><br></div><div>so what change the rescale option add to the transformation equation?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 26, 2013 at 7:40 PM, Markus Metz <span dir="ltr"><<a href="mailto:markus.metz.giswork@gmail.com" target="_blank">markus.metz.giswork@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tue, Mar 26, 2013 at 1:21 PM, Rashad M <<a href="mailto:mohammedrashadkm@gmail.com">mohammedrashadkm@gmail.com</a>> wrote:<br>


> It seems like values are different using the forumla. I can provide a test<br>
> case if you need<br>
><br>
><br>
><br>
> i tried this:<br>
> i.pca in=lsat7_2000_10,lsat7_2000_20 out=mypca<br>
><br>
> Rescaling to range 0,255...<br>
>  100%<br>
> Eigen values, (vectors), and [percent importance]:<br>
> PC1    436.48 ( 0.6640, 0.7477) [98.84%]<br>
> PC2      5.13 (-0.7477, 0.6640) [ 1.16%]<br>
><br>
><br>
> here only first column of eigen vector is important right?<br>
><br>
> But let me ask does eigen values and percent of importance doesnt have any<br>
> role?<br>
><br>
> here when running the above i.pca i get mypca.1 and mypca.2<br>
> P1 and P2 are first pixel row=0, col=0 of mypca.1 and mypca.2 respectively<br>
> and mean is the mean of lsat7_2000_10<br>
><br>
> output is the output obtained from the equation --> (X = P * eigenvector(P,<br>
> X) + P * eigenvector(Q, X) + mean(B1) )<br>
><br>
> and input is the pixel value of lsat7_2000_10 @ row=0, col=0<br>
><br>
><br>
> P1=  21<br>
> P2=  112<br>
> mean=    79.925<br>
> output=  138.4471<br>
> input=   72<br>
><br>
> Any thoughts?<br>
<br>
</div></div>You need to disable rescaling of the PC scores with i.pca rescale=0,0<br>
<br>
Markus M<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
><br>
> On Tue, Mar 26, 2013 at 4:54 PM, Markus Metz <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>><br>
> wrote:<br>
>><br>
>> On Tue, Mar 26, 2013 at 12:10 PM, Rashad M <<a href="mailto:mohammedrashadkm@gmail.com">mohammedrashadkm@gmail.com</a>><br>
>> wrote:<br>
>> ><br>
>> ><br>
>> ><br>
>> > On Tue, Mar 26, 2013 at 3:58 PM, Markus Metz<br>
>> > <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> On Tue, Mar 26, 2013 at 10:25 AM, Rashad M <<a href="mailto:mohammedrashadkm@gmail.com">mohammedrashadkm@gmail.com</a>><br>
>> >> wrote:<br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> > On Tue, Mar 26, 2013 at 2:44 PM, Markus Metz<br>
>> >> > <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>><br>
>> >> > wrote:<br>
>> >> >><br>
>> >> >> On Tue, Mar 26, 2013 at 8:39 AM, Rashad M<br>
>> >> >> <<a href="mailto:mohammedrashadkm@gmail.com">mohammedrashadkm@gmail.com</a>><br>
>> >> >> wrote:<br>
>> >> >> > Hi,<br>
>> >> >> ><br>
>> >> >> > i.pca creates 6 raster maps for 6 input raster<br>
>> >> >> ><br>
>> >> >> > eg:<br>
>> >> >> ><br>
>> >> >> > i.pca<br>
>> >> >> ><br>
>> >> >> ><br>
>> >> >> ><br>
>> >> >> > in=lsat7_2002_10,lsat7_2002_20,lsat7_2002_30,lsat7_2002_40,lsat7_2002_50,lsat7_2002_70<br>
>> >> >> > \<br>
>> >> >> >     out=lsat7_2002_pca<br>
>> >> >> ><br>
>> >> >> ><br>
>> >> >> > I have a doubt here<br>
>> >> >> ><br>
>> >> >> > Does the output lsat7_2002_pca.1 is the corresponding map for<br>
>> >> >> > lsat7_2002_10?<br>
>> >> >><br>
>> >> >> No. lsat7_2002_pca.1 contains the principal component with the<br>
>> >> >> highest<br>
>> >> >> eigenvalue and is calculated using all input bands. More generally,<br>
>> >> >> each lsat7_2002_pca.* map is calculated using all input bands. Look<br>
>> >> >> at<br>
>> >> >> the eigenvectors to find out the weights with which each input map<br>
>> >> >> contributes to a specific PCA.<br>
>> >> >><br>
>> >> ><br>
>> >> > So by knowing a pixel value of lsat7_2002_pca.1 can I get the value<br>
>> >> > before<br>
>> >> > transformation in PCA.<br>
>> >> > consider this:<br>
>> >> > I have two bands B1,B2 and after i.pca I get PC1,PC2. Then is there a<br>
>> >> > way to<br>
>> >> > derive value of X,Y where X belongs to B1 and Y belongs to B2 by only<br>
>> >> > knowing P,Q<br>
>> >> > where P belongs to PC1 and Q belongs to PC2<br>
>> >> ><br>
>> >> > and also X,Y and P,Q are of same index (row,col)<br>
>> >><br>
>> >> X = P * eigenvector(P, X) + P * eigenvector(Q, X) + mean(B1)<br>
>> >><br>
>> >> Using the example from the manual:<br>
>> >><br>
>> >> X = 0.2824 * PC1 + 0.2541 * PC2 + 0.3801 * PC3 +  0.1752 * PC4 -<br>
>> >> 0.6170 * PC5 - 0.5475 * PC6 + mean(band 1)<br>
>> ><br>
>> ><br>
>> > Thanks.<br>
>> ><br>
>> > just a small clarification:<br>
>> > PC1 is the pixel value at (i,j) of output band  pca.1 and X is the pixel<br>
>> > value at (i,j) of input band b1<br>
>> ><br>
>> > This is correct?<br>
>><br>
>> yes<br>
>><br>
>> ><br>
>> >><br>
>> >> Markus M<br>
>> >><br>
>> >> ><br>
>> >> > I hope this is clear<br>
>> >> ><br>
>> >> >><br>
>> >> >> Markus M<br>
>> >> >><br>
>> >> >> ><br>
>> >> >> > If so the lsat7_2002_10_pca.1 contains PCA transformed pixel for<br>
>> >> >> > lsat7_2002_10<br>
>> >> >> ><br>
>> >> >> > Is this correct?<br>
>> >> >> ><br>
>> >> >> > --<br>
>> >> >> > Regards,<br>
>> >> >> >    Rashad<br>
>> >> >> ><br>
>> >> >> > _______________________________________________<br>
>> >> >> > grass-dev mailing list<br>
>> >> >> > <a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a><br>
>> >> >> > <a href="http://lists.osgeo.org/mailman/listinfo/grass-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-dev</a><br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> > --<br>
>> >> > Regards,<br>
>> >> >    Rashad<br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > Regards,<br>
>> >    Rashad<br>
><br>
><br>
><br>
><br>
> --<br>
> Regards,<br>
>    Rashad<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><font face="arial, helvetica, sans-serif">Regards,<br>   Rashad</font></div>
</div>