[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Setting precision in Ruby-GSL calculations ?

M. Edward (Ed) Borasky

7/30/2006 9:50:00 PM

Nuralanur@aol.com wrote:
> Dear all,
>
> I'd like to use ruby-gsl for some singular value decompositions, i.e.
> a matrix m should be decomposed into a product of three matrices,
>
> m=u*s*v.transposed,
>
> now,as the documentation says that this algorithm is not implemented
> if the dimensions of m (m1 x m2) are such that m1<m2, I've implemented
> my own version, re-reading some long-forgotten linear algebra book.
> In the process, I need to find the eigenvectors and the eigenvalues of
> m*m.transposed,
> but these are printed out and apparently also calculated only to three
> decimal digits
> by the command
>
> eigval, eigvec = Eigen::symmv(m*m.transposed).
>
> This causes the matrix u, which is constructed from the values eigval,
> to have quite strange values for its determinant (I get values of 1.06,
> 0.96 for u*u.transpose.det, but u is unitary by definition, i.e.,
> u*u.transpose.det=1).
>
> Then, of course, m isn't remotely equal to u*s*v.transposed ....
>
>
> Is there a way of setting the precision of the eigenvalue and eigenvector
> calculations
> any higher ?
>
> Thank you very much,
>
> Best regards,
>
> Axel
>
If m = u*s*v.transposed, what does m.transposed equal? Isn't it
m.transposed = v*s.transposed*u.transposed?

In other words, can you transpose m ... m.transposed has dimensions m2 x
m1 ... and take the SVD of m.transposed, and then recover the SVD of m
from that?

I've forgotten most of my computational linear algebra too. :)

By the way, how large are m1 and m2?