Hi, Ted

Thanks for your comment. The original matrix is:

qRef - 3 x 3
  12.00000 -51.00000   4.00000
   6.00000 167.00000 -68.00000
  -4.00000  24.00000 -41.00000

The result of mahout:
q - 3 x 3
  -0.85714   0.39429  -0.33143
  -0.42857  -0.90286   0.03429
   0.28571  -0.17143  -0.94286

r - 3 x 3
 -14.00000 -21.00000  14.00000
   0.00000-175.00000  70.00000
   0.00000   0.00000  35.00000

The result of wiki(http://en.wikipedia.org/wiki/QR_decomposition):

q - 3 x 3
  -0.85714   0.3110  -0.4106
  -0.42857  -0.8728   0.2335
  -0.28571   0.3761   0.8814

r - 3 x 3
 -14.00000 -8.4286  -2.0000
   0.00000  -187.1736  -35.1241
   0.00000   0.00000    -32.1761

I notice that there are differences in computing householder vector, given
input vector x,

In mahout, householder vector is computed as v= x/||x||,
however in wiki, it is computed as u = x+||x||*e1, v=u/||u||.

So, would you please give me  some clues about why did mahout(actually
JAMA) do like that?
Thanks for your reply!

Liu Liu
On Thu, Jan 19, 2012 at 8:01 AM, Ted Dunning <ted.dunn...@gmail.com> wrote:

> There are lots of QR decomposition algorithms and the results are not
> necessarily unique, especially for rank deficient inputs.
>
> If you post your exact results, I could comment more specifically.  Without
> more details, I really can't answer your question in any specific way.
>
> On Wed, Jan 18, 2012 at 9:39 AM, 刘鎏 <liuliu....@gmail.com> wrote:
>
> > Hi,
> > When I run QRDecomposition in mahout , I find the result of Q or R is
> > different from the example in wiki(
> >
> http://en.wikipedia.org/wiki/QR_decomposition#Using_Householder_reflections
> > ).
> > After reading the source code, I find the implement of QR decomposition
> is
> > exactly different from the tradition way such as the procedure in wiki.
> > Could any one show why mahout implement it in such a way? Thanks for your
> > replies!
> >
> > Liu Liu
> >
>



-- 
刘鎏

奇艺公司
北京市海淀区海淀东三街2号欧美汇大厦8层 100080

Phone: (010) 6267-7240
E-mail: liu...@qiyi.com
MSN: alex_rose2...@hotmail.com

Reply via email to