Re: Algorithm for PCA transform in ENVI [message #80059 is a reply to message #80054] |
Thu, 10 May 2012 02:17   |
ivitseva
Messages: 15 Registered: December 2009
|
Junior Member |
|
|
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
|
|
|