Submitted by AwayBobcat2273 t3_107xah8 in deeplearning

I am wanting to build a smallish personal project involving time-series forecasting and I would like to include AI forecasting into it.

Wonder if anyone has any experience or recommendations? Preferably I would like to just feed my time series historical data as an API and get back the forecasts. It is only 13 periods in the past and 13 periods of forecast times max 100 rows.

I was looking at some of the big cloud tech companies:

  1. Amazon Forecast
  2. Azure Time Series Insights
  3. IBM Watson Studio
  4. Google TensorFlow

Some of these look really expensive, like it would cost a few dollars just to do this which is 13 x 100 = 1,300 which I wouldn't think it would cost so much. Statistical time series forecasting this would be free. But I guess AI machine learning is way more expensive? Does anyone have any insights to share?

7

Comments

You must log in or register to comment.

DustinEwan t1_j3pnwfz wrote

Time series is an extremely complex problem unless there's clear periodicity to the data.

In this case linear regression may be a better approach than deep learning.

3

AwayBobcat2273 OP t1_j3poov9 wrote

ok thanks, yeah, I realised that there may not be much to train on so might not work

2

ASalvail t1_j3pvlls wrote

You don't have enough data to use AI, you're likely just going to overfit the series. In fact, time series are usually fairly short which led to the whole forecasting community to erroneously think ML could never be used for forecasting (see the M4 competition). Statistical is the way to go in your case.

If you absolutely want ML, use a simple random forest library.

3

TheLoneKid t1_j3q01a4 wrote

"Statistical is the way to go in your case." What do you mean here?

2

ASalvail t1_j3r5kxy wrote

A statistical model. I'm personally partial to using the ETS model (error, trend, seasonality), but a SARIMAX is also another good one. The 'issue' with a stats model will be that you need to do some hand tuning and thus need to understand how the model works (and ETS is a fairly simple one to comprehend).

2

trajo123 t1_j3qwftm wrote

13 periods as history to forecast another 13, this seems like a very atypical/extreme TS forecasting problem, do these services actually handle so little data?

First, it's unlikely that this little data is enough for anything but the simplest models. Probably the best you could do in terms of a domain independent model is linear regression. Even so calculating performance metrics - knowing how good the model is - is going to be challenging as that would require you to further reduce the amount of training data in order to have a validation/"out of sample" set.

Getting useful predictions with so little data is probably going to require you to make a model with strong assumptions - e.g. come up with a set of domain-specific parametrized equations that govern the time-series and then fit those parameters to the data.

In any case, Deep Learning is far from the first approach that comes to mind trying to solve this problem. Solving this problem is probably just a few lines of code using R or scipy.stats + sklearn, probably less than calling the cloud API functions. The trick is to use the right mathematical model.

2

trajo123 t1_j3qwrtb wrote

I understand that you want to use 13 rows of history for prediction, but do you have more than 13 rows to train the model? How many rows do you have in total?

1

shrshk7 t1_j3pf6di wrote

I’ve been wanting to do the same, I did some research over past few days and seems like this can be achieved in tensorflow js, for the amount of data you mentioned I think you can train the model in the browser

1

atlvet t1_j3r06ld wrote

Agree with what others have said about the limited amount of data. If you’re just looking for some code to experiment with, I’ve used the open source library Prophet from Meta which is built for time-series forecasting.

https://facebook.github.io/prophet/

1

vulchinithin t1_j3riry6 wrote

How many columns do you have? You could forecast with reasonable accuracy with simple machine learning models if the data has less noise

1