In this lab exercise, you will learn a popular opensource machine learning algorithm, Long Short-Term Memory (LSTM). You will use this time-series algorithm to build a model from historical data of total COVID-19 cases. Then you use the trained model to predict the future COVID-19 cases.
In Cloud Pak for Data, click on the Assets tab on top, under Asset types expand the Source code tab and select Notebook.
You will see the three notebooks listed. You will refer to the Region-Brussels-LSTM.ipynb notebook.
Click on the three dot menu and select edit to get started.
The notebook should look something as shown below.
data_df_1
in the generated code snippet.Click on Cell on top and select Run All to run the notebook.
This will run the notebook, it will take some time please be patient.
Once the notebook is completed you can observe the following in the notebook:
Current Trend of COVID-19 cases in Brussels: The current trend of COVID-19 cases in Brussels is shown in the graph.
LSTM Model Accuracy: You can observe the Root Mean Squared Error (RMSE) values are almost similar for training & test data which confirms the accuracy of the model without overfitting or underfitting.
LSTM Model Loss: There’s no vanishing gradient descent as the LSTM model with optimal configueration has taken care of the gradient descent problem.
LSTM Model Prediction: You can observe the model is able to catch the pattern in the data.
The following CSV files are generated from the notebook:
These CSV files will be used to Visualize the Data in Watson Cognos Dashboard Embedded
You have successfully completed this lab exercise. You can continue to the next lab exercise.