Re: SVD require 'k' singular values/vectors only
From: Steven Lord (slord_at_mathworks.com)
Date: 01/24/05
- Next message: Julian V. Noble: "Motion blurring of images"
- Previous message: Julian V. Noble: "Re: new to Numerical Recipies"
- In reply to: spasmous: "SVD require 'k' singular values/vectors only"
- Next in thread: spasmous: "Re: SVD require 'k' singular values/vectors only"
- Reply: spasmous: "Re: SVD require 'k' singular values/vectors only"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 24 Jan 2005 15:05:09 -0500
"spasmous" <spasmous@yahoo.com> wrote in message
news:1106594010.321914.149730@f14g2000cwb.googlegroups.com...
> I know this is a FAQ topic but I haven't seen an answer...
>
> If I have a dense m x n matrix (m=rows > n=cols) and require only the k
> < n largest singular values and vectors, is there an SVD algorithm that
> extracts only what is needed? Or does the algorithm have to get all
> singular values, then sort them and return only the requested ones?
>
> I know MATLAB has a 'svds' function that does this but it's very slow
> compared to normal 'svd'. One would expect if k<<n then the code would
> be faster!
SVDS converts that matrix of size [m n] into a sparse matrix of size [(m+n),
(m+n)] and uses EIGS to compute the eigenvalues of that matrix. If your
original matrix is full, this will probably be a Big Sparse matrix. You
might want to try using the economy SVD using "SVD(A, 0)" [see HELP SVD for
a full description of what that syntax does] and pull the required K
singular values out of that -- that may be quicker.
-- Steve Lord slord@mathworks.com
- Next message: Julian V. Noble: "Motion blurring of images"
- Previous message: Julian V. Noble: "Re: new to Numerical Recipies"
- In reply to: spasmous: "SVD require 'k' singular values/vectors only"
- Next in thread: spasmous: "Re: SVD require 'k' singular values/vectors only"
- Reply: spasmous: "Re: SVD require 'k' singular values/vectors only"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|