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
-1
votes
2 answers

Picture dimension reduction

I need to reduce my picture dimension by means of singular value decomposition. I've seen a lot of sources for this theme. They advise to use the following: m, n = img.shape U, S, V = np.linalg.svd(img) #U.shape = m * m; S.shape = m * n; V.shape = n…
Igor
  • 1
  • 1
-1
votes
2 answers

Why do I get matrices of absurd values when trying to reconstruct an image from a singular value decomposition using numpy.linalg?

I am doing a singular value decomposition of a greyscale image (read: big matrix) via numpy.linalg. Thing is, when I try to reconstruct the image from the decomposition I get a matrix of absurd values which cannot correspond to the pixels of the…
-1
votes
1 answer

How SVD works in matrix factorization

I want to know about the ways of factorizing a matrix using SVD (Singular Value Decomposition). I found several articles, I have gone through many of them but i am not getting a clear idea about factorizing a matrix using SVD. What i found is , SVD…
-1
votes
1 answer

How to find a slice from n: m of singular value decomposition matrix, whithout cicles

SVD is equal to UΣVT, where U - m * k matrix,Σ - k * k diagonal matrix, VT - transposed k * m matrix. Also UΣVT can be determined as A = u1σ1vT1 + u2σ2vT2 + u3σ3vT3 where u1 - first column of U, σ1 - first element of Σ, vT1 - first column of…
Derkinfel
  • 1
  • 1
-1
votes
1 answer

What is the effect of a row of zeros in singular value decomposition?

I am writing some CUDA code for finding the 3 parameters of a circle (centre X,Y & radius) from many (m) measurements of positions around the perimeter. As m > 3 I am (successfully) using Singular Value Decomposition (SVD) for this purpose (using…
drG_Bristol
  • 165
  • 9
-1
votes
1 answer

co occurace matrix python

Given that I have a data set with 2 columns containing text data, I have to concatenate these 2 columns and then find the top 2k words using idf_ values and then use these words to create a co-occurrence matrix. I am getting with below code an index…
nikhil
  • 1
  • 2
-1
votes
1 answer

Reconstruct Matrix from svd components with Pyspark

I'm working on SVD using pyspark. But in the documentation as well as any other place I didn't find how to reconstruct the matrix back using the segemented vectors.For example, using the svd of pyspark, I got U, s and V matrix as below. from…
sharp
  • 29
  • 7
-1
votes
1 answer

Matlab 3D to 2D with Principal Component Analysis (PCA)

I want to do PCA on this 3D matrix: data=[5 4 5; 5 3 0; 1 2 2]; PCA should return two components, like 3D to 2D, to plot the data on a graph. What I've tried: data=[5 4 5; 5 3 0; 1 2 2]; x= princomp(data'); x But 'x' returns a 3D, instead of a 2D…
tamaramaria
  • 173
  • 1
  • 4
  • 17
-1
votes
1 answer

What does TruncatedSVD get_params([deep]) really do?

I don't understand the get_params([deep]) method available for TruncatedSVD in sklearn. Can some please explain it to me?
user77005
  • 1,769
  • 4
  • 18
  • 26
-1
votes
1 answer

different eigenvalues from np.eig and np.svd

I'm comparing the eigenvalues computed by np.eig(np.dot(A.T, A))**2 and np.eig(A). I found some values are the same but some are not. Can anybody tell me why would this happen?
aldin
  • 1
  • 1
-1
votes
1 answer

Why Matlab forces a sign convention while calculating the PCA coefficients?

I am applying PCA on my data (Image sequences) but got different results when I used the PCA (Matlab Toolbox) command and doing it manually makind matrix and using SVD command. After doing some search I found that matlab enforces some sign…
-1
votes
2 answers

I need to group the matrix value based on sign combination (+ -)

I am new to R programming. For my course work, I am implementing Recommendation system using R. I already convert data table to matrix and then processed SVD=udv using irlba funtion. Now I have the following matrix u. Now I need to classify them…
Anu
  • 211
  • 1
  • 9
-1
votes
1 answer

Single Value Decomposition in Matlab is slightly off

I'm trying to create code that finds the svd of an image. We're not allowed to actually use the svd() function. I managed to get an answer that's close but not exact. I'm comparing my answers to the result of the SVD function and my middle matrix is…
-1
votes
3 answers

Could not broadcast input array from shape (1285) into shape (1285, 5334)

I'm trying to follow some example code provided in the documentation for np.linalg.svd in order to compare term and document similarities following an SVD on a TDM matrix. Here's what I've got: results_t =…
helloB
  • 3,472
  • 10
  • 40
  • 87
-1
votes
1 answer

How can solve SVD from row-major matrix using cusolver gesvd function

I'm beginner for cuda. I want to try to solve svd for row-major matrix using cusolver API. but I'm confusing about leading dimension for matrix A. I have a row-major matrix 100x10.(e.g, I have 100 data which is in the 10 dimensional space.) As the…
Hotaek Han
  • 21
  • 1
1 2 3
49
50