andrewssobral / andrewssobral/redsvd

U and V have last column all zeros

Đang mở
#5 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
auto-migrated Priority-Medium Type-Defect
Ngôn ngữ chính
C++
Star
7
Fork
3
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

```
What steps will reproduce the problem?
1.
>cat densa.txt
1.5 0.0 2.5 2.5
0.0 2.5 2.5 0.0
1.5 0.0 2.5 1.0
0.0 2.5 2.5 0.0
0.0 2.5 2.5 0.0
2.
redsvd -i densa.txt -o densa -f dense -r 10
3.
>cat densa.U
-0.401793 +0.706597 -0.582481 +0.000000
-0.486488 -0.308495 -0.038651 +0.000000
-0.358540 +0.463912 +0.810083 +0.000000
-0.486488 -0.308495 -0.038651 +0.000000
-0.486488 -0.308495 -0.038651 +0.000000
>cat densa.V
-0.165886 +0.472878 +0.409235 +0.000000
-0.530701 -0.623149 -0.347478 +0.000000
-0.807177 +0.164981 +0.334580 +0.000000
-0.198253 +0.600711 -0.774494 +0.000000

What is the expected output? What do you see instead?
First, I expected U to be 5 by 5.
Tried same matrix in gnu octave, and the first 3 column match exactly, but the
last one have values not zero:
octave-3.2.4:1> A=[1.5 0 2.5 2.5;0 2.5 2.5 0; 1.5 0 2.5 1.0; 0 2.5 2.5 0;0 2.5
2.5 0]
A =

1.50000 0.00000 2.50000 2.50000
0.00000 2.50000 2.50000 0.00000
1.50000 0.00000 2.50000 1.00000
0.00000 2.50000 2.50000 0.00000
0.00000 2.50000 2.50000 0.00000

octave-3.2.4:2> [u,s,v]=svd(A);
octave-3.2.4:3> u
u =

-4.0179e-01 7.0660e-01 5.8248e-01 1.9052e-16 -3.8365e-20
-4.8649e-01 -3.0849e-01 3.8651e-02 8.1650e-01 -1.2869e-16
-3.5854e-01 4.6391e-01 -8.1008e-01 -3.1762e-17 3.8365e-20
-4.8649e-01 -3.0849e-01 3.8651e-02 -4.0825e-01 -7.0711e-01
-4.8649e-01 -3.0849e-01 3.8651e-02 -4.0825e-01 7.0711e-01

octave-3.2.4:4> v
v =

-1.6589e-01 4.7288e-01 -4.0924e-01 7.6249e-01
-5.3070e-01 -6.2315e-01 3.4748e-01 4.5750e-01
-8.0718e-01 1.6498e-01 -3.3458e-01 -4.5750e-01
-1.9825e-01 6.0071e-01 7.7449e-01 1.1102e-16

What version of the product are you using? On what operating system?
Ubuntu 12.04
redsvd 0.2.0

Please provide any additional information below.
I don't sure it is an issue, I didn't find any other information to let me know
if this behavior is expected.
```

Original issue reported on code.google.com by `hecha...@gmail.com` on 27 Sep 2012 at 4:27

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.