From the course: Applied AI for IT Operations (AIOps)
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Building an LSTM model with Keras - Python Tutorial
From the course: Applied AI for IT Operations (AIOps)
Building an LSTM model with Keras
- Now, we will build an LSTM models with Keras to predict a time series. As discussed in the earlier video, to predict each data point, we need to provide a lookback of data points. For this, we need to create a data set that associates each data point with the previous 168 data points, which is a week's worth of lookback. We do so using the Create RNN Dataset function. This function takes as input, a data set and a lookback period. It then creates the feature Vector X, and the prediction Y. X contains the previous 168 data points for the corresponding Y. This means that if we pass four weeks of data, we will only get three weeks of X and Y, since the first week will be lost in the lookback. We iterate over the data set, we create X using the last 168 lookback points and Y being the current point. We return the final array then. We use this method to create X and Y arrays for the training data set. Then we reshape X as a three dimensional array for use with LSTM. Finally, we print…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
Time series forecasting2m 27s
-
(Locked)
Recurrent neural network (RNN) and long short-term memory (LSTM)1m 37s
-
(Locked)
Preparing sequence data4m 8s
-
(Locked)
Building an LSTM model with Keras2m 19s
-
(Locked)
Testing the time series model2m 30s
-
(Locked)
Forecasting future service loads with Keras3m 10s
-
-
-
-
-