In this lab, you will build a sequence prediction model using TensorFlow that will forecast the amount of precipitation. You will be performing the entire model creation process, from retrieving the data and formatting it properly, to designing a model architecture and training it to meet a desired metric score.
This lab is designed to be used as a practice exam to test your skills in preparation for the TensorFlow Developer Certificate, and thus is a very challenging exercise.
Before beginning this lab, you should have PyCharm installed on your local computer. Additionally, you should have installed all packages required by the TensorFlow Developer Certificate exam.
Successfully complete this lab by achieving the following learning objectives:
- Retrieve and Load the Monthly Precipitation Data
- View the data to understand how to parse it.
- Retrieve the Monthly Precipitation JSON data.
- Load the JSON data into the program.
- Parse the dictionary into time steps and precipitation values.
- Normalize, Split, and Window the Dataset
- Review the model expectations to understand how to prepare your data.
- Normalize all of the data.
- Split the data into training, validation, and testing datasets.
- Convert the raw sequences into windowed sequences.
- Build and Train a Model to Predict the Precipitation
- Review the model expectations to understand how your model should accept and output data.
- Create an appropriate neural network model using Keras.
- Compile your model with an appropriate loss function for the problem type and data. Include any metrics you want to use to evaluate your model.
- Train your model to reach the desired performance. Remember to capture your history!
- Save the model.
- Evaluate Your Model with the Test Data
- Generate model statistics on the test data. Ensure you’ve met or exceeded the desired performance metric.
- Plot the predictions to see how well the model works.
- Plot the values from your training history.