0
$\begingroup$

I have the following time-series data with two value columns.

(t: time, v1: time-series values 1, v2: time-series values 2)

 t | v1 | v2 
---+----+----
 1 |  1 |  0
 2 |  2 |  2
 3 |  3 |  4
 4 |  3 |  6
 5 |  3 |  6
 6 |  4 |  6
 7 |  5 |  8
(7 rows)

I am trying to discover (or approximate) the correlation between the $v1$ and $v2$, and use that approximation for the next step predictions.

Please note, the most obvious correlation is $v2(t)=2.v1(t-1)$.

My question is, what are the algorithms to employ for such approximations and are there any open source implementations of those algorithms for SQL/python/javascript?

$\endgroup$

4 Answers 4

0
$\begingroup$

I believe you may want to look at Autoregressive Models (AR) like ARMA models. Python has implementations of all AR models. Python statsmodels have all the necessary tools you may require.

$\endgroup$
0
$\begingroup$

The algorithm which is best to implement this problem is the hidden Markov model because hidden Markov model is best for generative sequence and openMarkov and also you can implement this in pytorch,jax,tenserflow(all are open source).

$\endgroup$
0
$\begingroup$

There are a number of algorithms that could be used for such approximations, including linear regression to learn the relationship between $v1$ and $v2$. You could then use that relationship to predict $v2$ for new values of $v1$., k-nearest neighbors, and support vector machines. There are also a number of open-source implementations of these algorithms available, including scikit-learn, Weka, and TensorFlow.

there are a few ways to go about this:

  1. Look for existing research on the topic. This will give you an idea of which methods have been used successfully in the past and what kind of results have been achieved.

  2. Use a data mining tool such as Weka or R to explore the relationships between the time-series data. This will allow you to try out different methods and see which ones work best on your data.

  3. Use a machine learning algorithm to learn the relationships between the time-series data. This can be more challenging, but if you have a large amount of data it may be the best option.

$\endgroup$
0
$\begingroup$

I am currently working on anomaly detection for time series. Recently, I've read about so-called "dynamic time series" (dtw). This method finds similarity for time series. As far as I read, it is nicely applicable for shifted time series (your time series is shifted and scaled).

I hope that was helpful.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .