# time series prediction using LSTM

Hi I have fairly very short time series data. The data set has number of systems $s_{1}, s_{2}, s_{3},..s_{n}$. For each $s_{i}$ we have recorded number of failures on each day. As of now, we have recorded 30 days. I would like to know can I use LSTM for predicting number of system failures for next day. How about using Vector Auto Regression?. Any starting pointers and code references will be useful. Thank you.

• Here's a tutorial for LSTM on time series (machinelearningmastery.com/…) but honestly, it only works because this is a nice, seasonal example. I have yet to see an LSTM work well on time series. My suggestions, start simple and show us some data so we can better help. May 4 '17 at 19:55

Yes, LSTMs are fairly used in time series prediction. They can even handle missing data which is quite common in timeseries: Learning to diagnose with LSTM recurrent neural network. Still, I don't recommend starting directly with LSTM as the training takes time and you have to try many parameters to find the best that fits your data. You should start with some basic regressors like RandomForest or XGBoost.

If you already have the probabilities that a machine fails, you can use the Geometric Distribution to calculate the probabilites that a machine fails on the next day.

For a machine that breaks with 10% probability on a single day:

(This example is using R's built-in pgeom() function)

# probability that the machine breaks on 5th day or earlier
pgeom(4, 0.1)
# 0.4095

# probability that the machine is still working on 20th day
1 - pgeom(19, 0.1)
# 0.1216


Maybe you can use an educated guess for your probabilities as a baseline model for more sophisticated neural network models.