# LSTM vs ARIMA for demand prediction

I'm new to the field of time series prediction. I'm looking for a demand prediction model to predict when the product will be sold out from the online supermarket (when the supply is known in advance).

I know that LSTM and ARIMA are the "best" model for time series prediction. Is there any other model for demand prediction which could be better?

and what are the con and pros for those model for demand prediction?

Also, can someone give me some time frames to developing this kind of model? due I need to consider anything else than things in the regular model (like hyper-parameters tuning and etc.)

ARIMA models are basically linear models, so they can only work if the relation is linear (or linear integrated). They are easy to estimate.

LSTM can model more or less any relationship, but at the cost of additional computation and require more data to be trained.

So start with ARIMA if you don't know anything about our data, if it doesn't work, use a simple LSTM model and then complexity it to match what you need with the test set.

• what is the best way to estimate time series? ROC AUC? RMSE? – Dkova Dec 30 '18 at 11:14
• Depends on what you want to estimate. For stock option, it can be the MSE on the predicted delta. – Matthieu Brucher Dec 30 '18 at 19:36
• and if the data is online? a user is searching for something like a listing in Airbnb and I need to predict if the listing will be sold out soon on the user dates – Dkova Dec 31 '18 at 4:29
• Whether the data is online or offline doesn't change anything. If you want to predict probabilities, you can perhaps look at a cross entropy cost function. – Matthieu Brucher Dec 31 '18 at 7:52

LSTM add the capability of identifying complex pattern logics from data by using
remember what's useful and discard what's not
I have seen cases where ARIMA or its variation struggle for 70% accuracy and LSTM scores above 85%

Depending upon the data, a rmse less than 0.2 is usually great if data ranges is (0,1).