comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Algorithm for PCA transform in ENVI
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Algorithm for PCA transform in ENVI [message #80054] Thu, 10 May 2012 05:12 Go to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
On 10 mai, 11:17, ivitseva <eva.ivits-was...@jrc.ec.europa.eu> wrote:
> On May 9, 5:01 pm, "Kenneth P. Bowman" <k-bow...@null.edu> wrote:
>
>
>
>
>
>> In article < 0de35e20-3a9c-4593-8f06-ed3e6461f...@p21g2000vby.googlegroup s.com >,
>
>>  eva.ivits-was...@ext.jrc.ec.europa.eu wrote:
>>> Does anybody know what the algorithm for PCA transform in ENVI is?
>>> I've compared the eigenvectors and the spatial patterns of ENVI's PCA
>>> transform with IDL's eigenql, svdc and la_svd procedures. The first PC
>>> components are the same but from the second component on I have
>>> negative values where ENVI give positive values and vice versa.
>>> Accordingly, the first element in the diagonal of the eigenvector
>>> matrices has the same sign but the rest of the signs are just the
>>> oppostie comparing results from ENVI and IDL.
>>> Any clues?
>>> Thanks in advance,
>>> Eva
>
>> If you have a properly-constructed covariance matrix, the eigenvalues should all
>> be greater than or equal to zero.  If you are getting negative eigenvalues you
>> are doing something wrong.
>
>>   http://brunnur.vedur.is/pub/halldor/PICKUP/eof.pdf
>
>> Ken Bowman
>
> Hi Ken,
> Thanks.
> It is the eigenvectors and not the eigenvalues I was talking about
> (btw. the eigenvalues are all positive). And using the svdc function
> you do not use the covariance matrix but the centered time series.
> Anyway, the problem is that the signs in the spatial patterns (EOFs or
> the modes) are the opposite of that what ENVI reports, which is
> probably a question of rotation. However, I do not know what ENVI does
> and thus I cannot decide what the problem is. That is why I've posted
> the question.
>
> Eva
>
>

Eva,
SVD algorithm produces unique singular vectors, up to multiplication
by an unit phase factor (for the real case up to sign). That is the
same as saying that singular vector matrices must be unitary.
ENVI and IDL are not in contradiction. They are just doing different
arbitrary choices.
alain.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Widget to play and pause image stack display
Next Topic: EOS_SW_CREATE HDF function file path issue

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 20:28:36 PDT 2025

Total time taken to generate the page: 0.63868 seconds