Opened 16 years ago

Closed 16 years ago

#430 closed defect (fixed)

i.pca's output and history logged "Comments" disagree

Reported by: nikos Owned by: grass-dev@…
Priority: major Milestone: 6.4.0
Component: Raster Version: unspecified
Keywords: i.pca, output messages, history Cc: nikos.alexandris@…
CPU: Unspecified Platform: Unspecified

Description

In a raster maps history produced with i.pca on "Date: Tue Oct 28 03:33:27 2008" the Comments section states: Eigen vectors: ( -0.64 -0.65 -0.42 ) ( -0.71 0.28 0.64 ) ( -0.30 0.71 -0.64 )

Now, I reproduced the exact same processing (based on the history) and the output message is: Eigen values: ( 0.79 0.61 0.06 ) ( 0.44 -0.50 -0.74 ) ( 0.42 -0.61 0.67 )

However, the history log states (not in a nice formatting as well :-( : Comments:

Eigen vectors: ( 0.79 0.61 0.06 ) ( 0.44 -0.50 -0.74 ) ( 0.42 -0.61 0.67 )

It's an important issue in my opinion and someone with experience should review it. There is also http://trac.osgeo.org/grass/ticket/341.

Thank you, Nikos

P.S. For some reason I never get a notification from trac. So I can't follow-up quickly (re-)actions in my trac-posts. So apologies for delays.

Attachments (2)

i.pca_message_corrected.diff (408 bytes ) - added by nikos 16 years ago.
i.pca output message correction
i_pca.diff (879 bytes ) - added by neteler 16 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by nikos, 16 years ago

By "not nice formatting: I mean the following (copy-pasted from the terminal):

GRASS 6.4.svn (hgrs87):~ > r.info -h pca.2007.242.500.b267_with250mregion_TEST.1 Data Source: Data Description:

generated by i.pca

Comments:

Eigen vectors: ( 0.79 0.61 0.06 ) ( 0.44 -0.50 -0.74 ) ( 0.42 -0.61 0.67 )

i.pca input="MOD2007_242_500_sur_refl_b02,MOD2007_242_500_sur_refl_b\ 06,MOD2007_242_500_sur_refl_b07" output="pca.2007.242.500.b267_with2\ 50mregion_TEST" rescale=0,0

Where is the "box" (=lines enclosing the history-log) ?

by nikos, 16 years ago

i.pca output message correction

comment:2 by hamish, 16 years ago

probably-fixed in latest devbr6 svn.

awaiting comments,

Hamish

in reply to:  2 comment:3 by nikos, 16 years ago

Replying to hamish:

awaiting comments

Now that I look again at the results (meaning the tests I have sent in the ML and in the wiki as well [1]) I think that your thought about increasing the decimals printed in i.pca's output is not a bad idea.

Perhaps adding one more digit to make it look like (arbitrary numbers here):

Eigen values, (vectors), and [percent importance]:
PC1 6307563.04 ( -0.643 -0.653 -0.423 ) [ 98.71% ]
PC2 78023.63 ( -0.713 0.283 0.643 ) [ 1.22% ]
PC3 4504.60 ( -0.303 0.713 -0.643 ) [ 0.07% ]

Kind regards, Nikos

[1] http://grass.osgeo.org/wiki/Principal_Component_Analysis

by neteler, 16 years ago

Attachment: i_pca.diff added

comment:4 by neteler, 16 years ago

Attached i_pca.diff patch produces

# NC location
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
...
Eigen values, (vectors), and [percent importance]:                                                                                                                          
PC1 4712.17 (-0.2798,-0.3332,-0.5054,-0.0015,-0.5341,-0.5196)[84.05%]
PC2 595.40 (-0.2528,-0.1877,-0.2969, 0.7494, 0.5002, 0.0289)[10.62%]
PC3 240.56 ( 0.3864, 0.3842, 0.2670, 0.6147,-0.4058,-0.2987)[4.29%]
PC4 33.01 (-0.1768, 0.0165, 0.4083,-0.1576, 0.4396,-0.7640)[0.59%]
PC5 20.75 (-0.6063,-0.2610, 0.6087, 0.1795,-0.3255, 0.2357)[0.37%]
PC6 4.25 ( 0.5565,-0.7986, 0.2186, 0.0583, 0.0255,-0.0265)[0.08%]

r.info lsat7_2002_pca.1
 +----------------------------------------------------------------------------+
 | Layer:    lsat7_2002_pca.1               Date: Mon Mar 23 16:14:10 2009    |
 | Mapset:   user1                          Login of Creator: neteler         |
 | Location: nc_spm_07                                                        |
 | DataBase: /home/neteler/grassdata                                          |
 | Title:     ( lsat7_2002_pca.1 )                                            |
 | Timestamp: none                                                            |
...
 |   Comments:                                                                |
 |    Eigen values, (vectors), and [percent importance]:                      |
 |    PC1   4712.17 (-0.2798,-0.3332,-0.5054,-0.0015,-0.5341,-0.5196)[84.05%] |
 |    PC2    595.40 (-0.2528,-0.1877,-0.2969, 0.7494, 0.5002, 0.0289)[10.62%] |
 |    PC3    240.56 ( 0.3864, 0.3842, 0.2670, 0.6147,-0.4058,-0.2987)[4.29%]  |
 |    PC4     33.01 (-0.1768, 0.0165, 0.4083,-0.1576, 0.4396,-0.7640)[0.59%]  |
 |    PC5     20.75 (-0.6063,-0.2610, 0.6087, 0.1795,-0.3255, 0.2357)[0.37%]  |
 |    PC6      4.25 ( 0.5565,-0.7986, 0.2186, 0.0583, 0.0255,-0.0265)[0.08%]  |
 |                                                                            |
 |    i.pca input="lsat7_2002_10,lsat7_2002_20,lsat7_2002_30,lsat7_2002_40\   |
 |    ,lsat7_2002_50,lsat7_2002_70" output="lsat7_2002_pca" rescale=0,255     |
 |                                                                            |
 +----------------------------------------------------------------------------+

OK for everybody?

Markus

comment:5 by nikos, 16 years ago

+1

Nikos

comment:6 by neteler, 16 years ago

Resolution: fixed
Status: newclosed

Fixed in 6.4.0SVN (r36525), 6.5 (r36526), 7 (r36527).

Note: See TracTickets for help on using tickets.