MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: covariance, eigenvalues

  • To: mathgroup at
  • Subject: [mg51914] Re: covariance, eigenvalues
  • From: koopman at (Ray Koopman)
  • Date: Fri, 5 Nov 2004 02:17:06 -0500 (EST)
  • References: <cma08u$8rl$>
  • Sender: owner-wri-mathgroup at

cagdaskafali at (cagdas) wrote in message 
news:<cma08u$8rl$1 at>...
> I have a random vector of length 15000 by 1. I have 130 samples of
> this vector and I would like to estimate the covariance matrix. Is
> there a built-in function in mathematica to do that ? If there is,
> can it handle a covariance matrix of size 15000 by 15000?
> If I can get that matrix the next step is an eigenvalue decomposition.
> Are there any built-in functions to compute eigenvalues and
> eigenvectors of a given matrix ? and again, is it possible to use
> these functions for a matrix of size 15000 by 15000?

Your covariance matrix will be of order 15000 but its rank will be 129.
The nonzero eigenvalues, and their corresponding eigenvectors, can be
obtained from an SVD on the centered data matrix. If your data are in 
a 15000 by 130 matrix "a", then

   {v,d} = Most@SingularValues[(#-Mean@#&)/@a]

will give the square roots of the eigenvalues as elements of vector d,
and the corresponding eigenvectors as the rows of matrix v.

  • Prev by Date: Re: Functions with optional parameters
  • Next by Date: Re: Re: Counting Runs
  • Previous by thread: Re: covariance, eigenvalues
  • Next by thread: weird page breaks when printing