Hvass-Labs / TensorFlow-Tutorials

TensorFlow Tutorials with YouTube Videos
MIT License
9.28k stars 4.19k forks source link

23_Time-Series-Prediction.ipynb - Predicting future values when have no test data? #109

Closed krinkere closed 5 years ago

krinkere commented 5 years ago

i see how you take observed values, and then compare the results of the model to the actual to determine how accurate you are, but i dont see how you can easily say, predict for next year

In other words, i used stats package in python such as ARIMA, VAR and there is a handy function that would predict future without any input data, so i was hoping to see something like that here.

LSTM just does not seem to be very good tool to use in this case if you simply wants to know future predictions and uncertain about what the future feature values would be.

almost think that LSTM can give you answers to the future if you want to throw some feature values and curious about what would this input to produce

but it is not mean to be true forecasting tool like arima or var since you can’t say given this input, predict 2 years worth of data for me in the future

Hvass-Labs commented 5 years ago

If you want a discussion you should post this as a comment on the youtube video. Nobody will see it here.

hasslercastro commented 5 years ago

@krinkere I see your point, however is the same thing what you do in [S[VA[RIMA]X]] and all of its variations and what you do here. Why? you might ask. Let's use a simple VAR as illustration

image

When you use VAR you fit your model with some temporal data and the formulation of the problem use/consider 'p' times in the past (p value that you selected depende on the AIC) to forecast future. So when you use forecast, the model use the last 'p' observations of your training set to forecast the future. Then, it is actually using data you provided In the same fashion LSTM works here, now we are more explicit to determine how many steps on the future we would like to predict. So if you train your RNN with a time horizont 'k' your forecasting will be accurate in those 'k' steps if that makes sense.

A real example, suppose you work in a factory that sells 't-shirts' and they want to forecast the demand of these t-shirts, so you decide to build a model to help your chief out with the resource management. The VAR model to predict how many t-shirts are being sold today afternoon , will use 'p' days in the past based again in the AIC. But when you build LSTM is "kind of the opposite", you define your problem based on the conditions today how many t-shirts will I sell tomorrow?