Questions tagged [svd]

Singular Value Decomposition (SVD) is a factorization of a real or complex matrix, with many useful applications in signal processing and statistics.

The Singular Value Decomposition (SVD) of a rectangular matrix A is a decomposition of the form:

A = U S V*

where U and V are orthogonal matrices, and S is a diagonal matrix containing the singular values.

In scientific software for statistical computing, function svd computes this decomposition.

746 questions
11
votes
2 answers

Fit points to a plane algorithms, how to iterpret results?

Update: I have modified the Optimize and Eigen and Solve methods to reflect changes. All now return the "same" vector allowing for machine precision. I am still stumped on the Eigen method. Specifically How/Why I select slice of the eigenvector…
Michael
  • 559
  • 6
  • 15
10
votes
1 answer

How do we decide the number of dimensions for Latent semantic analysis ?

I have been working on latent semantic analysis lately. I have implemented it in java by making use of the Jama package. Here is the code: Matrix vtranspose ; a = new Matrix(termdoc); termdoc = a.getArray(); a = a.transpose() ;…
CTsiddharth
  • 907
  • 12
  • 21
10
votes
1 answer

LAPACK SVD (Singular Value Decomposition)

Do yo know any example to use LAPACK To calculate SVD?
edgarmtze
  • 24,683
  • 80
  • 235
  • 386
10
votes
4 answers

SVD for sparse matrix in R

I've got a sparse Matrix in R that's apparently too big for me to run as.matrix() on (though it's not super-huge either). The as.matrix() call in question is inside the svd() function, so I'm wondering if anyone knows a different implementation of…
Ken Williams
  • 22,756
  • 10
  • 85
  • 147
10
votes
1 answer

SVD - Matrix transformation Python

Trying to compute SVD in Python to find the most significant elements of a spectrum and created a matrix just containing the most significant parts. In python I have: u,s,v = linalg.svd(Pxx, full_matrices=True) This gives 3 matrices back; where…
Phorce
  • 4,424
  • 13
  • 57
  • 107
10
votes
1 answer

Correct way to extract Translation from Essential Matrix through SVD

I calibrated my camera and found the intrinsic parameters(K). Also I have calculated the Fundamental Matrix (F). Now E= K_T* F * K . So far so good. Now we pass the Essential Matrix(E) to the SVD to use the decomposition values (U,W,V) to extract…
farzin parsa
  • 537
  • 2
  • 9
  • 33
9
votes
6 answers

Singular Value Decomposition (SVD) in PHP

I would like to implement Singular Value Decomposition (SVD) in PHP. I know that there are several external libraries which could do this for me. But I have two questions concerning PHP, though: 1) Do you think it's possible and/or reasonable to…
caw
  • 30,999
  • 61
  • 181
  • 291
9
votes
2 answers

Any reason why Octave, R, Numpy and LAPACK yield different SVD results on the same matrix?

I'm using Octave and R to compute SVD using a simple matrix and getting two different answers! The code is listed below: R > a<-matrix(c(1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1), 9, 4) > a [,1] [,2] [,3] [,4] …
Clive
  • 405
  • 2
  • 5
  • 12
9
votes
2 answers

What is benefit to use SVD for solving Ax=b

I have a linear equation such as Ax=b where A is full rank matrix which its size is 512x512. b is a vector of 512x1. x is unknown vector. I want to find x, hence, I have some options for doing that 1.Using the normal way inv(A)*b 2.Using SVD (…
Jame
  • 3,746
  • 6
  • 52
  • 101
8
votes
2 answers

How to generate a Rank 5 matrix with entries Uniform?

I want to generate a rank 5 100x600 matrix in numpy with all the entries sampled from np.random.uniform(0, 20), so that all the entries will be uniformly distributed between [0, 20). What will be the best way to do so in python? I see there is an…
Galen BlueTalon
  • 173
  • 4
  • 20
8
votes
2 answers

How to deal with missing values in python scikit NMF

I am trying to apply NMF on my dataset, using python scikit-learn. My dataset contains 0 values and missing values. But scikit-learn does not allow NaN value in data matrix. Some posts said that replace missing values with zeros. my questions…
8
votes
4 answers

SVD speed in CPU and GPU

I'm testing svd in Matlab R2014a and it seems that there is no CPU vs GPU speedup. I'm using a GTX 460 card and a Core 2 duo E8500. Here is my code: %test SVD n=10000; %host Mh= rand(n,1000); tic %[Uh,Sh,Vh]= svd(Mh); svd(Mh); toc %device Md =…
mrgloom
  • 20,061
  • 36
  • 171
  • 301
8
votes
1 answer

Matrix factorization for collaborative filtering - new users and items?

I've been reading about using matrix factorization for collaborative filtering, but I can't seem to find an example that deals with adding a new user or item to the system, or having the user rate a new item. In these cases, the item-user matrix and…
7
votes
2 answers

Is it possible to compile svdlibc on a mac (64 bit)?

I'm trying to compile svdlibc on a 64 bit mac. Running the make file returns the error message: main.c:1: error: CPU you selected does not support x86-64 instruction set main.c:1: error: CPU you selected does not support x86-64 instruction…
Rob Lachlan
  • 14,289
  • 5
  • 49
  • 99
7
votes
0 answers

Calculate determinant of unitary matrices based on SVD implementation

I have a real square matrix X which I need to perform a Singular Value Decomposition on. Now, performing the operation X=USV^T as U and V are orthogonal, we know that det(X)=±det(S) and det(S) is non-negative as singular values are…
cheetah
  • 201
  • 1
  • 5
1
2
3
49 50