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

Home » Public Forums » archive » Re: Principal component analysis
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: Principal component analysis [message #57137 is a reply to message #57134] Wed, 05 December 2007 08:08 Go to previous messageGo to previous message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
I have tried that, it gives
IDL> ev=imsl_princ_comp(correlate(a,/cov)) & print,ev
45.2906 3.70938-2.65683e-006

These EVs are the same as you get using PCOMP with /COV keyword.


"Vince Hradil" <hradilv@yahoo.com> wrote in message
news:54fc6ed8-ccd7-4ac6-8e0d-09f5d190eeac@o6g2000hsd.googleg roups.com...
> On Dec 5, 9:12 am, Vince Hradil <hrad...@yahoo.com> wrote:
>> On Dec 5, 8:00 am, "Haje Korth" <haje.ko...@nospam.jhuapl.edu> wrote:
>>
>>> Hi,
>>> I am puzzled by principal component analysis. I calculated the
>>> eigenvalues
>>> using both PCOMP and IMSP_PRINC_COMP routines. Could someone enlighten
>>> me
>>> why the results are completely different? I have tried different
>>> keywords to
>>> see whether I can match them by trial and error, but I had no success.
>>> There
>>> must be someone out there who undertstands this much better than I do.
>>
>>> Thanks so much,
>>> Haje
>>
>>> IDL> a=[[1,-2,-6],[-2,1,-3],[-6,-3,5]]
>>> IDL> pca=pcomp(a,eigenvalues=ev) & print,transpose(ev)
>>> 2.24227 0.757732 0.000000
>>> IDL> ev=imsl_princ_comp(a) & print,ev
>>> 9.53359 -5.19751 2.66392
>>
>> From the HELP:
>>
>> Syntax
>> Result = IMSL_PRINC_COMP(covariances [, /COV_MATRIX]
>> [, /CORR_MATRIX] [, CORRELATIONS=variable] [, CUM_PERCENT=variable] [,
>> DF=variable] [, /DOUBLE] [, EIGENVECTORS=variable] [,
>> STDEV=variable] )
>>
>> Note that IMSL_PRINC_COMP requires that you pass the covariance or
>> correlation matrix - not the vectors.
>
> so maybe try
> ev=imsl_princ_comp(correlate(a,/covariance) & print, ev
> (I don't have an analyst license)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Pointers problem - Unable to dereference NULL pointer
Next Topic: IDL7 Paths, again

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

Current Time: Fri Oct 10 02:00:25 PDT 2025

Total time taken to generate the page: 0.87636 seconds