The two lists are the same within a factor of -2 and
the fact that the R eigenvalues seem to be missing
the value 0.

--Chris

On Tue, Jan 24, 2012 at 5:13 PM, ANJAN PURKAYASTHA
<[email protected]> wrote:
> Hi all,
> Sorry for this data intensive post. I am a PDL newbie and am writing
> multidimensional scaling module in PDL.
> I used the following code: my ($eigen_vec, $eigen_val)=
> PDL::Math::eigens($g); to generate the eigenvalues (and vectors) for a
> matrix $g which is:
> [
>  [-0.46762857 -0.24672857  0.13132857  0.13132857  0.13132857  0.13132857
> 0.13132857  0.13132857 -0.35872857  0.13132857 -0.24672857  0.16482143
> 0.16482143 0.070871429]
>  [-0.24672857 -0.46762857  0.13132857  0.13132857  0.13132857  0.13132857
> 0.13132857  0.13132857 -0.24672857  0.13132857 -0.35872857  0.16482143
> 0.16482143 0.070871429]
>  [ 0.13132857  0.13132857 -0.27791429 -0.15541429 -0.15541429 -0.15541429
> -0.15541429 -0.15541429  0.13132857 -0.15541429  0.13132857  0.25967857
> 0.25967857  0.16572857]
>  [ 0.13132857  0.13132857 -0.15541429 -0.27791429 -0.15541429 -0.15541429
> -0.15541429 -0.15541429  0.13132857 -0.15541429  0.13132857  0.25967857
> 0.25967857  0.16572857]
>  [ 0.13132857  0.13132857 -0.15541429 -0.15541429 -0.27791429 -0.15541429
> -0.15541429 -0.15541429  0.13132857 -0.15541429  0.13132857  0.25967857
> 0.25967857  0.16572857]
>  [ 0.13132857  0.13132857 -0.15541429 -0.15541429 -0.15541429 -0.27791429
> -0.15541429 -0.15541429  0.13132857 -0.15541429  0.13132857  0.25967857
> 0.25967857  0.16572857]
>  [ 0.13132857  0.13132857 -0.15541429 -0.15541429 -0.15541429 -0.15541429
> -0.27791429 -0.15541429  0.13132857 -0.15541429  0.13132857  0.25967857
> 0.25967857  0.16572857]
>  [ 0.13132857  0.13132857 -0.15541429 -0.15541429 -0.15541429 -0.15541429
> -0.15541429 -0.27791429  0.13132857 -0.15541429  0.13132857  0.25967857
> 0.25967857  0.16572857]
>  [-0.35872857 -0.24672857  0.13132857  0.13132857  0.13132857  0.13132857
> 0.13132857  0.13132857 -0.46762857  0.13132857 -0.24672857  0.16482143
> 0.16482143 0.070871429]
>  [ 0.13132857  0.13132857 -0.15541429 -0.15541429 -0.15541429 -0.15541429
> -0.15541429 -0.15541429  0.13132857 -0.27791429  0.13132857  0.25967857
> 0.25967857  0.16572857]
>  [-0.24672857 -0.35872857  0.13132857  0.13132857  0.13132857  0.13132857
> 0.13132857  0.13132857 -0.24672857  0.13132857 -0.46762857  0.16482143
> 0.16482143 0.070871429]
>  [ 0.16482143  0.16482143  0.25967857  0.25967857  0.25967857  0.25967857
> 0.25967857  0.25967857  0.16482143  0.25967857  0.16482143  -1.2027286
> -1.1127286 -0.16157857]
>  [ 0.16482143  0.16482143  0.25967857  0.25967857  0.25967857  0.25967857
> 0.25967857  0.25967857  0.16482143  0.25967857  0.16482143  -1.1127286
> -1.2027286 -0.16157857]
>  [0.070871429 0.070871429  0.16572857  0.16572857  0.16572857  0.16572857
> 0.16572857  0.16572857 0.070871429  0.16572857 0.070871429 -0.16157857
> -0.16157857  -1.1204286]
> ]
>
> The list of eigenvalues I get is:
>  -0.1089 -0.3329 8.5614601633457e-15 -0.1225 -0.1225 -0.1225 -0.1225 -0.1225
> -2.9792477876937 -0.1225 -0.1089 -1.88386103059169 -0.0900000000000002
> -1.10299118171461
>
> However the eigenvalues returned for the same matrix,in R are:
> 1.4896239 0.9419305 0.5514956 0.1664500 0.0612500 0.0612500 0.0612500
> 0.0612500 0.0612500 0.0612500 0.0544500 0.0544500 0.0450000
>
> The two lists clearly do not match. Any idea where I am going wrong?
>
> Thank you,
> Anjan
>
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to