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

747 questions
6
votes
1 answer

Computing N smallest eigenvalues of Sparse Matrix in Python

I'd like to find the N smallest eigenvalues of a sparse matrix in Python. I've tried using the scipy.sparse.linalg.eigen.arpack package, but it is very slow at computing the smallest eigenvalues. I read somewhere that there is a shift-invert mode,…
Eliezer
  • 747
  • 7
  • 7
6
votes
4 answers

Sort eigenvalue matrix with eigenvector matrix

I have N eigenvalues in column vector form. Thus there are N eigenvectors corresponding to these eigenvalues, forming an eigenvector matrix. Now, the problem I am working on requires me to sort the eigenvalues column vector in descending order. How…
Bonk
  • 1,859
  • 9
  • 28
  • 46
6
votes
2 answers

Issue with computing eigenvalues using mathematica

Basically I'm trying to find the eigenvalues for matrix, and it takes about 12 hours. When it finishes, it says it couldn't find all the eigenvectors (actually barely any), and I'm skeptical about the ones it did find. All I can really do is post my…
adhanlon
  • 6,407
  • 13
  • 43
  • 41
6
votes
3 answers

Fast methods for approximating the highest 3 eigenvalues and eigenvectors of a large symmetric matrix

I am writing code to compute Classical Multidimensional Scaling (abbreviated to MDS) of a very large n by n matrix, n = 500,000 in my example. In one step of MDS, I need to compute the highest three eigenvalues and their corresponding eigenvectors…
Paul Terwilliger
  • 1,596
  • 1
  • 20
  • 45
6
votes
1 answer

Numpy eig/eigh gives negative values for a symmetric positive-semi definite matrix

The following code for the CIFAR dataset after GCN: xtx = np.dot(dataset.train_data[i].transpose(), dataset.train_data[i]) e, q = np.linalg.eigh(xtx) print(np.max(e), np.min(e)) Produces the following output: 2.65138e+07 -0.00247511 This is…
Alex Botev
  • 1,369
  • 2
  • 19
  • 34
6
votes
1 answer

LAPACK giving me incorrect eigenvalues

I am using DSYEV and DSYEVD from the LAPACK library to find eigenvalues and eigenvectors (Compilation syntax: gfortran -llapack ). However, I find wrong eigenvalues (-0.44,0.35,0.88) for a particular matrix. What's going wrong? One can easily see…
hbaromega
  • 2,317
  • 2
  • 24
  • 32
6
votes
1 answer

How to find a better algorithm to compute eigenvalue and eigenvector of a very large matrix

I have used Jacobi method to find all eigenvalues and eigenvectors in c code. Though the complexity of Jacobi method is O(n^3) but the dimension of my matrix is huge (17814 X 17814). It takes a lot of time. I want to know a better algorithm by which…
6
votes
2 answers

How to use eig with the nobalance option as in MATLAB?

In MATLAB I can issue the command: [X,L] = eig(A,'nobalance'); In order to compute the eigenvalues without the balance option. What is the equivalent command in NumPy? When I run the NumPy version of eig, it does not produce the same result as the…
Isopycnal Oscillation
  • 3,234
  • 6
  • 21
  • 37
6
votes
2 answers

Can't get a positive definite variance matrix when very small eigen values

To run a Canonical correspondence analysis (cca package ade4) I need a positive definite variance matrix. (Which in theory is always the case) but: matrix(c(2,59,4,7,10,0,7,0,0,0,475,18714,4070,97,298,0,1,0,17,7,4,1,4,18,36),nrow=5) > a [,1]…
joel lapalme
  • 219
  • 2
  • 8
6
votes
7 answers

Copying upper MatrixXd to lower MatrixXd (Eigen3) C++ library

I've got a lower triangular MatrixXd and I want to copy its lower values to the upper side as it'll become a symmetric matrix. How can I do it? So far I've done: MatrixXd m(n,n); ..... //do something with m for(j=0; j < n; j++) { …
Manolete
  • 3,431
  • 7
  • 54
  • 92
6
votes
2 answers

complex eigen values in PCA calculation

Iam trying to calculate PCA of a matrix. Sometimes the resulting eigen values/vectors are complex values so when trying to project a point to a lower dimension plan by multiplying the eigen vector matrix with the point coordinates i get the…
Ahmed Kotb
  • 6,269
  • 6
  • 33
  • 52
5
votes
1 answer

Scipy banded eigensolver much slower than standard eigensolver

I'm observing a strange behaviour concerning the scipy.linalg.eig_banded eigensolver. I am generating banded matrices of size N=p*f that have a specific structure. The matrices are symmetric tri-block-diagonal with p blocks of size fxf on the main…
Marcel Ferrari
  • 321
  • 1
  • 8
5
votes
1 answer

Tensorflow eigenvalue decomposition is extremely slow

I am using eigendecomposition in Tensorflow and find that it is extremely slow. Here's the code to show Tensorflow's speed vs numpy and scipy: import numpy as np import scipy as sp import tensorflow as tf from time import time A =…
Seanslice
  • 153
  • 6
5
votes
0 answers

Eigensystem of parametrized, hermitian matrix in python

Suppose we are interested in the eigenvalues and eigenvectors of a hermitian matrix h(t) that depends on a parameter t. My matrix is large and sparse and hence needs to be treated numerically. A naive approach is to evaluate the matrix h(t_k) at…
tree frog
  • 53
  • 4
5
votes
1 answer

Suppress negligible complex numpy eigenvalues?

I am calculating the eigenvalues of a covariance matrix, which is real and symmetric positive semi-definite. Therefore, the eigenvalues and eigenvectors should all be real, however numpy.linalg.eig() is returning complex values with (almost) zero…
PyRsquared
  • 6,970
  • 11
  • 50
  • 86
1 2
3
49 50