You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Tamas Jambor <ja...@gmail.com> on 2013/03/01 16:43:05 UTC

length of Sigma in SSVD

Hi,

I am trying to run SSVD to compute PCA. As a final result I'd like to
compute U*Sigma.

But it seems that the dimensions of the U and Sigma I get from SSVD don't
agree, I get a longer Sigma that U. just wondering if someone could explain
where I can get the correct Sigma from?

thanks,Tamas

Re: length of Sigma in SSVD

Posted by Tamas Jambor <ja...@gmail.com>.
thanks I found it, I was looking at 0.7 (but it seems that this option is
from 0.8)

On Fri, Mar 1, 2013 at 8:13 PM, Dmitriy Lyubimov <dl...@gmail.com> wrote:

> On Fri, Mar 1, 2013 at 7:43 AM, Tamas Jambor <ja...@gmail.com> wrote:
>
> > Hi,
> >
> > I am trying to run SSVD to compute PCA. As a final result I'd like to
> > compute U*Sigma.
> >
>
> there should be an option, -us, to bake in sigma into U output so you don't
> have to have extra job to multiply that yourself. see the manual on the
> wiki.
>
>
> >
> > But it seems that the dimensions of the U and Sigma I get from SSVD don't
> > agree, I get a longer Sigma that U. just wondering if someone could
> explain
> > where I can get the correct Sigma from?
> >
>
> I don't remember it offhand. The svd rank computed is  actually k+p where k
> is considered to be useful and p is later thrown away. It is thrown away in
> matrix outputs but it may still be in the Sigma output. (I known for sure
> it is thrown away correctly if one gets it form SSVDSolver.getSigma()). If
> you need Sigma, just take first k values in the output vector.
>
>
> > thanks,Tamas
> >
>

Re: length of Sigma in SSVD

Posted by Dmitriy Lyubimov <dl...@gmail.com>.
On Fri, Mar 1, 2013 at 7:43 AM, Tamas Jambor <ja...@gmail.com> wrote:

> Hi,
>
> I am trying to run SSVD to compute PCA. As a final result I'd like to
> compute U*Sigma.
>

there should be an option, -us, to bake in sigma into U output so you don't
have to have extra job to multiply that yourself. see the manual on the
wiki.


>
> But it seems that the dimensions of the U and Sigma I get from SSVD don't
> agree, I get a longer Sigma that U. just wondering if someone could explain
> where I can get the correct Sigma from?
>

I don't remember it offhand. The svd rank computed is  actually k+p where k
is considered to be useful and p is later thrown away. It is thrown away in
matrix outputs but it may still be in the Sigma output. (I known for sure
it is thrown away correctly if one gets it form SSVDSolver.getSigma()). If
you need Sigma, just take first k values in the output vector.


> thanks,Tamas
>