From: PGM <pgm...@gm...> - 2006-09-06 07:57:46
|
Folks, I need to compute some cross-correlations between time series, and I naturally started to use numpy.correlate. Howver, I'm not sure about the convention being used: The crosscorrelation is usually defined as $\gamma_{xy}[k] = \sum_{i}{x[i] y[i+k]}$ So, when I compute >>> numpy.dot(x[:-1],y[1:]) on two 1D series of same size $n$, I should have $\gamma[1]$. With numpy.correlate, I have to use >>>numpy.correlate(x,y,'full')[(n-1)-1] or reverse x and y to get $\gamma[1]$ Is that correct ? P. |