Function: crossCorrelate()
ts
function crossCorrelate(
a,
b,
maxLag?,
normalize?): Correlation;Defined in: stats/signal.ts:190
Cross-correlation of two series over ±maxLag. normalize (default true) divides by the zero-lag autocorrelations, so the result is a correlation coefficient in −1..1 and the peak lag reads directly as "b lags a by k". Pass the same array twice for an autocorrelation.
Parameters
| Parameter | Type | Default value |
|---|---|---|
a | ArrayLike<number> | undefined |
b | ArrayLike<number> | undefined |
maxLag | number | ... |
normalize | boolean | true |