Questions tagged [eigenvalue]

The eigenvalue is the factor by which the eigenvector is scaled when multiplied by the matrix.

The eigenvectors of a square matrix are the non-zero vectors that, after being multiplied by the matrix, remain parallel to the original vector. For each eigenvector, the corresponding eigenvalue is the factor by which the eigenvector is scaled when multiplied by the matrix. The prefix eigen- is adopted from the German word "eigen" for "own"[1] in the sense of a characteristic description. The eigenvectors are sometimes also called characteristic vectors. Similarly, the eigenvalues are also known as characteristic values.

Find more on this topic on Wikipedia

649 questions
43
votes
2 answers

whats the fastest way to find eigenvalues/vectors in python?

Currently im using numpy which does the job. But, as i'm dealing with matrices with several thousands of rows/columns and later this figure will go up to tens of thousands, i was wondering if there was a package in existence that can perform this…
yurib
  • 7,591
  • 3
  • 27
  • 53
35
votes
8 answers

How expensive is it to compute the eigenvalues of a matrix?

How expensive is it to compute the eigenvalues of a matrix? What is the complexity of the best algorithms? How long might it take in practice if I have a 1000 x 1000 matrix? I assume it helps if the matrix is sparse? Are there any cases where the…
Frank
27
votes
1 answer

Why eigenvector & eigenvalue in LDA become zero?

I'd like to implement fast PLDA (Probabilistic Linear Discriminant Analysis) in OpenCV. in this, LINK fast PLDA have been implemented in Matlab and Python. One of the parts of PLDA is LDA. I've written following code for implementing LDA in…
Saeid
  • 428
  • 1
  • 4
  • 17
23
votes
2 answers

Numpy transpose multiplication problem

I tried to find the eigenvalues of a matrix multiplied by its transpose but I couldn't do it using numpy. testmatrix = numpy.array([[1,2],[3,4],[5,6],[7,8]]) prod = testmatrix * testmatrix.T print eig(prod) I expected to get the following result…
Virgiliu
  • 2,658
  • 4
  • 29
  • 52
20
votes
1 answer

Python Numpy TypeError: ufunc 'isfinite' not supported for the input types

Here's my code: def topK(dataMat,sensitivity): meanVals = np.mean(dataMat, axis=0) meanRemoved = dataMat - meanVals covMat = np.cov(meanRemoved, rowvar=0) eigVals,eigVects = np.linalg.eig(np.mat(covMat)) I get the error in the title…
swabygw
  • 481
  • 1
  • 6
  • 19
20
votes
1 answer

Calculating eigen values of very large sparse matrices in python

I have a very large sparse matrix which represents a transition martix in a Markov Chain, i.e. the sum of each row of the matrix equals one and I'm interested in finding the first eigenvalue and its corresponding vector which is smaller than one. I…
Zachi Shtain
  • 786
  • 12
  • 30
17
votes
8 answers

What is the fastest way to calculate first two principal components in R?

I am using princomp in R to perform PCA. My data matrix is huge (10K x 10K with each value up to 4 decimal points). It takes ~3.5 hours and ~6.5 GB of Physical memory on a Xeon 2.27 GHz processor. Since I only want the first two components, is…
384X21
  • 6,165
  • 3
  • 15
  • 17
17
votes
1 answer

Matlab's eigs not converging unless number of eigenvalues computed is large

I am trying to compute the eigenvalues, λ (lambda), of a damped structure with the following equations of motion: (λ²M + λC + K) x = 0, where M, C, and K are sparse matrices. Using MATLAB's polyeig function works, but I would like to go to larger…
Dimitri K
  • 179
  • 3
15
votes
1 answer

What is the difference between 'eig' and 'eigs'?

I've searched a lot for this but I can't find any answer about how the two methods 'eig' and 'eigs' differ. What is the difference between the eigenvalues and eigenvectors received from them?
Gustav
  • 1,363
  • 1
  • 12
  • 24
14
votes
2 answers

Python eigenvalue computations run much slower than those of MATLAB on my computer. Why?

I would like to compute the eigenvalues of large-ish matrices (about 1000x1000) using Python 2.6.5. I have been unable to do so quickly. I have not found any other threads addressing this question. When I run a = rand(1000,1000); tic; for i =1:10 …
Jamie D
  • 141
  • 1
  • 3
14
votes
2 answers

Does Matlab eig always returns sorted values?

I use a function at Matlab: [V,D] = eig(C); I see that V and D are always sorted ascending order. Does it always like that or should I sort them after I get V and D values?
kamaci
  • 65,625
  • 65
  • 210
  • 342
10
votes
5 answers

how to implement eigenvalue calculation with MapReduce/Hadoop?

It is possible because PageRank was a form of eigenvalue and that is why MapReduce introduced. But there seems problems in actual implementation, such as every slave computer have to maintain a copy of the matrix?
Liu Liu
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
  • 29,212
  • 58
  • 168
  • 279
9
votes
4 answers

Eigenvalues in MATLAB

In MATLAB, when I run the command [V,D] = eig(a) for a symmetric matrix, the largest eigenvalue (and its associated vector) is located in last column. However, when I run it with a non-symmetric matrix, the largest eigenvalue is in the first…
Spencer
  • 245
  • 1
  • 5
  • 9
8
votes
3 answers

Python numpy compute first eigenvalue and eigenvector

I was wondering if there is a Python package, numpy or otherwise, that has a function that computes the first eigenvalue and eigenvector of a small matrix, say 2x2. I could use the linalg package in numpy as follows. import numpy as np def…
Ray
  • 5,953
  • 11
  • 49
  • 74
1
2 3
43 44