Package pycv :: Package cs :: Package linalg :: Module linalg
[hide private]
[frames] | no frames]

Module linalg

source code

Functions [hide private]
 
symm_eig(a)
Return the eigenvectors and eigenvalues of the symmetric matrix a'*a.
source code
 
ordered_eigh(m)
Return eigenvalues and corresponding eigenvectors of the hermetian array m, ordered by eigenvalues in decreasing order.
source code
Function Details [hide private]

symm_eig(a)

source code 
Return the eigenvectors and eigenvalues of the symmetric matrix a'*a. If
a has more columns than rows, then that matrix will be rank-deficient,
and the non-zero eigenvalues and eigenvectors can be more easily extracted
from the matrix a*a', from the properties of the SVD:
  if a of shape (m,n) has SVD u*s*v', then:
    a'*a = v*s'*s*v'
    a*a' = u*s*s'*u'
That is, v contains the eigenvectors of a'*a, with s'*s the eigenvalues,
according to the eigen-decomposition theorem.
Now, let s_hat, an array of shape (m,n), be such that s * s_hat = I(m,m)
  and s_hat * s = I(n,n). With that, we can solve for u or v in terms of the
  other:
    v = a'*u*s_hat'
    u = a*v*s_hat

ordered_eigh(m)

source code 
Return eigenvalues and corresponding eigenvectors of the hermetian array m, ordered by eigenvalues in decreasing order. Note that the numpy.linalg.eigh makes no order guarantees.