I want to do regression on a time series where my output variable is a in the time series. My I have a measurements of a time series $(x_1, x_2, \cdots, x_n)$ and want to predict the variable $y$ which is not a measurement of the time series.

The obvious first option would be some simple linear regression, but that doesn't take into account the time series nature of the data. Time series methods that I'm looking at seem to be related to forecasting the next value in the series. What methods take into account the temporal nature of the data that aren't regression?

EDIT I have a series of time series and I want to predict a value for each time series. The value I want to predict is a slightly strange value. It is a time to an event happening. so it is actually two values, did the event happen, and when did it happen?


  • 1
    $\begingroup$ Do you want to predict a value for $y$ at each time step? Or do you have a set of time series and want to predict one value of $y$ for each time series? $\endgroup$
    – Lynn
    Commented Apr 1, 2023 at 8:37
  • $\begingroup$ Have a series of time series and want to predict a value for each time series. It's a little more sophisticated than that actually, I'll update the question. Thanks for the right comment $\endgroup$ Commented Apr 2, 2023 at 6:36

1 Answer 1


One way to approach the problem would be to first classify the time series according to whether the event did or did not happen. Then for those where the event did happen, run a regression to predict when it happened. While you can use standard classification and regression techniques for this, as you point out, these ignore the temporal dimension of the time series.

There are many classifiers designed for classifying time series. The classic one is a one nearest neighbour classifier that uses dynamic time warping (DTW) as the distance measure (1-NN DTW). If you're using python, both the sktime and tslearn packages include implementations of 1-NN DTW (as well as other time series classifiers). Some more recent, state-of-the-art classifiers include HIVE-COTE 2.0 and MultiRocket.

There's been less research into non-forecasting regression (sometimes called extrinsic regression) for time series, however many time series classifiers can be fairly easily adapted for extrinsic regression. For instance, using 1-NN DTW, you can simply replace the 1-NN classifier with a 1-NN regressor. Tan et al.'s paper Time series extrinsic regression benchmarks a number of time series extrinsic regression methods.

If you are interested in deep learning methods, you might find Foumani et al.'s survey paper Deep Learning for Time Series Classification and Extrinsic Regression: A Current Survey useful (disclaimer: I'm a co-author of this paper).

  • $\begingroup$ Perfect thanks for the references, a lot can change if the right word is used "extrinsic regression". $\endgroup$ Commented Apr 2, 2023 at 20:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.