Mombu the Science Forum sponsored links

Go Back   Mombu the Science Forum > Science > SVD Algorithm
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 27th April 10:13
luigi napolitano
External User
 
Posts: 1
Default SVD Algorithm



Good morning.

I'm searching for an SVD algorithm (in C, C++ or Java).
I have tried SVD algorithm of "Numerical Recipes", but Singular Values are
not in descending order.
I have tried SVD algorithm of "JAMA" (Java Matrix Package), but it doesn't
work with number of rows < number of columns.

I would like to find an SVD algorithm with these characteristics:
- It should work with m>=n and m<n (number of rows < number of columns);
- Singular Values (w0, w1, ... wN) must be returned in descending order.

I hope that there's someone to help me.
Thanks to everybody.
Luigi Napolitano
  Reply With Quote


  sponsored links


2 27th April 10:13
lou pecora
External User
 
Posts: 1
Default SVD Algorithm



So use the 'sort' algorithms in Num.Rec. to put them in the right order.
That's easy. You can simultaneously reorder the matrices of the SVD to
match the SVs.

-- Lou Pecora (my views are my own)
  Reply With Quote
3 27th April 10:13
luigi napolitano
External User
 
Posts: 1
Default SVD Algorithm


"Lou Pecora" <pecora@anvil.nrl.navy.mil> ha scritto nel messaggio
newsecora-4CDCB9.09444214122004@ra.nrl.navy.mil...

Thanks for your reply.
Excuse me, where is this algorithm?

If I sort Singular Value (Matrix W), than the columns of U and the rows of V
must be interchanged (so U * W * V transpose = A).

Is there an algorithm?
Thanks.
  Reply With Quote
4 28th April 05:26
lou pecora
External User
 
Posts: 1
Default SVD Algorithm


Look up 'sort' in Numerical Recipes.

Just reorder the columns and rows of each matrix by the sort order you
get when you sort the SVs. E.g. if the singular values are


1.03 2.2 0.484


Then the sort order (descending) is 2, 1, 3. The 2nd is the largest,
etc.

So put the origiinal 2nd column of U in the first column, the origiinal
1st column of U in the second column, and leave the 3rd where it is.
Similarly for rows of V^T.

That's it.

Have fun.

-- Lou Pecora (my views are my own)
  Reply With Quote
5 28th April 05:26
luigi napolitano
External User
 
Posts: 1
Default SVD Algorithm


"Lou Pecora" <pecora@anvil.nrl.navy.mil> ha scritto nel messaggio
newsecora-6868A1.12300715122004@ra.nrl.navy.mil...


Perfect!

Thanks for your idea.
Luigi Napolitano
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666