MathGroup Archive 2004

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

Search the Archive

Re: covariance, eigenvalues

  • To: mathgroup at smc.vnet.net
  • Subject: [mg51861] Re: [mg51843] covariance, eigenvalues
  • From: Tomas Garza <tgarza01 at prodigy.net.mx>
  • Date: Thu, 4 Nov 2004 01:49:02 -0500 (EST)
  • References: <200411030625.BAA08378@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

The only problem here is the time needed to complete your computations. Size 
is no problem by itself. As an example, I took 130 samples of a vector of 
length 1,500 (i.e., one-tenth of what you want), and used the inbuilt 
function CovarianceMatrix. It took about 117 seconds on a 2GHz machine with 
512 MB memory.

In[1]:=

<< "Statistics`MultiDescriptiveStatistics`";


In[15]:=
x = Table[Random[], {130}, {1500}];


In[16]:=
AbsoluteTiming[m = CovarianceMatrix[x]; ]
Out[16]=
{117.Second, Null}

Same goes for the eigenvalues and eigenvectors.

In[18]:=
Eigenvalues[m];//AbsoluteTiming
Out[18]=
{9.0000000 Second,Null}


In[20]:=
Eigenvectors[m];//AbsoluteTiming
Out[20]=
{55.4531250 Second,Null}



If you increase from 1,500 to 15,000 you must expect a very considerable 
increase in computer time to get your results.



Tomas Garza

Mexico City

----- Original Message ----- 
From: "cagdas" <cagdaskafali at yahoo.com>
To: mathgroup at smc.vnet.net
Subject: [mg51861] [mg51843] covariance, eigenvalues


> Hi,
>
> 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?
>
> I would appreciate any suggestions (related to mathematica or some
> other options)
>
> Thanks
>
> Cagdas
>
> 



  • Prev by Date: Re: bimodal ditribution form counting signs of Pi digits differences
  • Next by Date: Re: Re: Re: closing notebook cells
  • Previous by thread: Re: covariance, eigenvalues
  • Next by thread: Re: covariance, eigenvalues