diff --git a/book/_toc.yml b/book/_toc.yml index 58151b0..627540e 100644 --- a/book/_toc.yml +++ b/book/_toc.yml @@ -15,11 +15,14 @@ parts: - caption: Models chapters: - file: notebooks/simple_cnn.md - title: Background + title: Simple CNN sections: - file: notebooks/Data_Prep.ipynb - title: Prep_Data + title: - Prep_Data - file: notebooks/CHL_prediction_CNN.ipynb - title: CNNs - - file: notebooks/CHL_prediction_ConvLSTM_.ipynb - title: Fit ConvLSTM + title: - Fit CNN + - file: notebooks/simple_cnn.md + title: ConvLSTM + sections: + - file: notebooks/CHL_prediction_ConvLSTM_.ipynb + title: - Fit ConvLSTM diff --git a/book/notebooks/convlstm.md b/book/notebooks/convlstm.md new file mode 100644 index 0000000..1562fc9 --- /dev/null +++ b/book/notebooks/convlstm.md @@ -0,0 +1,20 @@ +# ConvLSTM + +Our data are a time series of images and it would be good to use that time information and prior days' observations of Chlorophyll-a to help use make predictions. The idea is similar to the simple CNN except that we add the prior days. Mathematically it is more complicated since we do not include the prior days as independent variables; we take into account that the information in consecutive days is correlated. + +This type of model is what we will want to use to make predictions when we have the day from prior days available. We want to take that data into account since today is likely to be similar to yesterday. + +![](images/convlstm.jpg) + +## Prepping the data + + +## Modeling fitting, validation and testing + +The model steps are the same as for the Simple CNN example. + +Once we have the data in the right form, we pass our model fitting function the training data sets `X_train` (predictors) and `y_train` (response or what we are trying to learn). During training, we learn the parameters. + +During the validation step, we will run a loop to improve our hyperparameters (structure of our model) using the `X_val` and `y_val` that were not used in training. The result is our 'best' model. + +Finally, during the test step, we use our best model to make predictions for the days that it has never 'seen' (the test data). It will use the predictors for these test days (`X_test`) to make predictions and then we will compare the predictions to the true values (`y_test`). \ No newline at end of file