[GRASS-dev] PCA (i.pca) in G7: filtering and rescaling

Moritz Lennert mlennert at club.worldonline.be
Wed Dec 4 06:50:18 PST 2013


On 04/12/13 15:34, Nikos Alexandris wrote:
> On Wednesday 04 of December 2013 16:22:51 Nikos Alexandris wrote:
>> Nikos Alexandris wrote:
>>>> The i.pca module in G7 offers a "forward/filtering/backward" PCA.  I
>>>> have
>>>> an issue first with filtering and second with rescaling.
>>>>
>>>> 1) I can't see any differences in the derived Principal Components
>>
>> okay, to clarify: I mean the resulting images which, initially are Principal
>> Components (synthetic images) and, after applying filtering & backward PCA,
>> the resulting images approach the original data -- still they are modified.
>
> Example (using i.pca in G7, though r.info below executed from G64):
>
> <http://nikosalexandris.net/owncloud/public.php?service=files&t=e87b1223bf6402786ef7478690099602>
>
> and details for
>
> P=90) r.info -rh PC90N.1
>
> min=171.596979136065
> max=1107.42672094831
> Data Source:
>
>
> Data Description:
>     generated by i.pca
> Comments:
>     Eigen values, (vectors), and [percent importance]:
>     PC1      2.78 ( 0.4947, 0.5922, 0.5743, 0.2735) [69.53%]
>     PC2      1.08 ( 0.5196, 0.0517,-0.0974,-0.8473) [26.99%]
>     PC3      0.11 ( 0.4210, 0.2486,-0.7926, 0.3644) [ 2.86%]
>     PC4      0.03 (-0.5551, 0.7647,-0.1805,-0.2729) [ 0.63%]
>
>     i.pca -n -f input="Blue_DNs,Green_DNs,Red_DNs,NIR_DNs" output_prefix\
>     ="PC90N" rescale=0,0 percent=90
>
>
> P=70) r.info -rh PC70N.1
>
> min=171.596979136065
> max=1107.42672094831
> Data Source:
>
>
> Data Description:
>     generated by i.pca
> Comments:
>     Eigen values, (vectors), and [percent importance]:
>     PC1      2.78 ( 0.4947, 0.5922, 0.5743, 0.2735) [69.53%]
>     PC2      1.08 ( 0.5196, 0.0517,-0.0974,-0.8473) [26.99%]
>     PC3      0.11 ( 0.4210, 0.2486,-0.7926, 0.3644) [ 2.86%]
>     PC4      0.03 (-0.5551, 0.7647,-0.1805,-0.2729) [ 0.63%]
>
>     i.pca -n -f input="Blue_DNs,Green_DNs,Red_DNs,NIR_DNs" output_prefix\
>     ="PC70N" rescale=0,0 percent=70
>

Which components are used ? IIUC, in both cases it will be PCs 1 and 2 as

PC1 < 70% and PC1 + PC2 > 90%

Moritz




More information about the grass-dev mailing list