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

Home » Public Forums » archive » Re: SVDC - singular values not in decreasing order?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: SVDC - singular values not in decreasing order? [message #82230] Wed, 28 November 2012 14:11
Andy Sayer is currently offline  Andy Sayer
Messages: 127
Registered: February 2009
Senior Member
Got it, thanks. :)

On Wednesday, November 28, 2012 1:58:51 PM UTC-5, AMS wrote:
> Hi all,
>
>
>
> I am interested in singular value decomposition in IDL, using the svdc routine.
>
>
>
> I had been under the impression that the singular values in such an analysis were given in descending order (order of importance of the singular vectors); see e.g. http://alias-i.com/lingpipe/demos/tutorial/svd/read-me.html So, the first vector explains the largest portion of variance, the second the next, and so forth.
>
>
>
> However, from my own analysis and also the example in the IDL help page (http://idlastro.gsfc.nasa.gov/idl_html_help/SVDC.html ), this is not the case (they are not in decreasing order). So, my questions are:
>
>
>
> 1. Is this intentional?
>
> 2. What does it mean? To find the 'n' most significant vectors, should I be taking the first 'n' returned by IDL, or the 'n' with the largest singular values?
>
>
>
> Any advice would be appreciated!
>
>
>
> Andrew
Re: SVDC - singular values not in decreasing order? [message #82231 is a reply to message #82230] Wed, 28 November 2012 12:24 Go to previous message
Lajos Foldy is currently offline  Lajos Foldy
Messages: 176
Registered: December 2011
Senior Member
On Wednesday, November 28, 2012 8:22:04 PM UTC+1, AMS wrote:

> So now I have a new question: for what purpose might I want to use svdc instead of la_svd?

LA_SVD is newer, it was added in IDL 5.6. I think SVDC was kept for compatibilty with older versions.

regards,
Lajos
Re: SVDC - singular values not in decreasing order? [message #82232 is a reply to message #82231] Wed, 28 November 2012 11:22 Go to previous message
Andy Sayer is currently offline  Andy Sayer
Messages: 127
Registered: February 2009
Senior Member
Hi Lajos,

Thanks for the suggestion; I can confirm it gives the expected behaviour (i.e. same vectors and singular values, but ordered largest to smallest). So, I'll change to use that.

So now I have a new question: for what purpose might I want to use svdc instead of la_svd?

Andrew

On Wednesday, November 28, 2012 2:12:11 PM UTC-5, fawltyl...@gmail.com wrote:
> On Wednesday, November 28, 2012 7:58:51 PM UTC+1, AMS wrote:
>
>> Hi all,
>
>>
>
>>
>
>>
>
>> I am interested in singular value decomposition in IDL, using the svdc routine.
>
>>
>
>>
>
>>
>
>> I had been under the impression that the singular values in such an analysis were given in descending order (order of importance of the singular vectors); see e.g. http://alias-i.com/lingpipe/demos/tutorial/svd/read-me.html So, the first vector explains the largest portion of variance, the second the next, and so forth.
>
>>
>
>>
>
>>
>
>> However, from my own analysis and also the example in the IDL help page (http://idlastro.gsfc.nasa.gov/idl_html_help/SVDC.html ), this is not the case (they are not in decreasing order). So, my questions are:
>
>>
>
>>
>
>>
>
>> 1. Is this intentional?
>
>>
>
>> 2. What does it mean? To find the 'n' most significant vectors, should I be taking the first 'n' returned by IDL, or the 'n' with the largest singular values?
>
>>
>
>>
>
>>
>
>> Any advice would be appreciated!
>
>>
>
>>
>
>>
>
>> Andrew
>
>
>
>
>
> Use LA_SVD, it works as you expected.
>
>
>
> regards,
>
> Lajos
Re: SVDC - singular values not in decreasing order? [message #82233 is a reply to message #82232] Wed, 28 November 2012 11:12 Go to previous message
Lajos Foldy is currently offline  Lajos Foldy
Messages: 176
Registered: December 2011
Senior Member
On Wednesday, November 28, 2012 7:58:51 PM UTC+1, AMS wrote:
> Hi all,
>
>
>
> I am interested in singular value decomposition in IDL, using the svdc routine.
>
>
>
> I had been under the impression that the singular values in such an analysis were given in descending order (order of importance of the singular vectors); see e.g. http://alias-i.com/lingpipe/demos/tutorial/svd/read-me.html So, the first vector explains the largest portion of variance, the second the next, and so forth.
>
>
>
> However, from my own analysis and also the example in the IDL help page (http://idlastro.gsfc.nasa.gov/idl_html_help/SVDC.html ), this is not the case (they are not in decreasing order). So, my questions are:
>
>
>
> 1. Is this intentional?
>
> 2. What does it mean? To find the 'n' most significant vectors, should I be taking the first 'n' returned by IDL, or the 'n' with the largest singular values?
>
>
>
> Any advice would be appreciated!
>
>
>
> Andrew


Use LA_SVD, it works as you expected.

regards,
Lajos
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: SVDC - singular values not in decreasing order?
Next Topic: Code to read bog standard DirectShow Windows webcam video?

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

Current Time: Wed Oct 08 13:46:17 PDT 2025

Total time taken to generate the page: 0.00622 seconds