MathGroup Archive 2009

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

Search the Archive

Re: Efficient construction of a correlation matrix

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98475] Re: Efficient construction of a correlation matrix
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 10 Apr 2009 04:57:09 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <grkgl2$69m$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

Outer[] and Correlate[] may help.

sample = Table[RandomReal[], {50}, {10}];

Outer[Correlation, sample, sample, 1]

?

Regards
   Jens

dantimatter wrote:
> Hello all,
> 
> This was a question that was asked back in 2003 that didn't seem to
> have a response:  is there a fast way to generate a matrix of
> correlation coefficients given a list of vectors?  I have about fifty
> vectors that are each around 1300 elements long and I'd like to
> correlate them with each other to get a 50x50 matrix.  I know that I
> can do this with loops or tables but I thought that perhaps there
> exists a fast and computationally inexpensive way to do this.   Any
> thoughts?
> 
> Many thanks,
> Dan
> 


  • Prev by Date: Re: Simplifying an expression for computational, not aesthetic
  • Next by Date: Re: passing both arbitary and defined options
  • Previous by thread: Re: Efficient construction of a correlation matrix
  • Next by thread: Re: Efficient construction of a correlation matrix