Graph correlation discovery algorithm
-
10-10-2019 - |
سؤال
I'm not a mathematician, so I'll try to describe this in a layperson's terms.
I'm trying to take two time series, which could represent any variable quantity, maximum daily temperature, stock price high of the day, etc. These would be multiplied by a factor that would make their maxima and minima correspond. (E.g., two temperature series might range between different coldest and warmest temperatures, but in both I'd treat coldest as 0% and warmest as 100%.)
Given this, I want to find out what relative shift in their start times would produce the "most" correlation. That is, the longest sample period with a "high" correlation. (I know that's a bit fuzzy.)
As a simple example, given last year's temperatures for several cities, it might choose two cities that both had a period of several weeks in which every other day had a maximum temperature that was 2/3 of the preceding day. This didn't necessarily start for both cities on the same day. That's where the time shifting trials come in.
A pointer to a discussion, pseudo code, or actual utility library would be good.
المحلول
You are trying to calculate Cross-Correlations.