Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: covariance, eigenvalues

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

cagdaskafali at yahoo.com (cagdas) wrote in message 
news:<cma08u$8rl$1 at smc.vnet.net>...
> 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