Model Understanding >
MLP
MLP (Multi-Layer Perceptron) is one of the most simpliest neutral network model. It can capture non-linear
relationships between features and target and also find patterns by identifying features automatically.
MLP architecture
We use multi-layer percenptron with ReLU as activation function so that features can be discovered. Dropouts are added between layers to prevent overfitting.
MLP for Air Passengers
To demonstrate model performance, we show the model's prediction results for the air passengers dataset. The cross validation process identified the best transformation to make the time series stationary and the optimal hyperparameters. The Root Mean Squared Error on the next day's closing price was used to determine the best model.
In the chart, we display the model's predictions for last split of cross validation and test data.
- train: Training data of the last split.
- validation: Validation data of the last split.
-
prediction (train, validation): Prdiction for train and validation data period. For each row (or a sliding window) of data, predictions are made for n days into the future (where n is set to 1, 2, 7). The predictions are then combined into a single series of dots. Since the accuracy of predictions decreases for large n, we see some hiccups in the predictions. The predictions from the tail of the train spills into the validation period as that's future from the 'train' data period viewpoint. These are somewhat peculiar settings, but it works well in testing if the model's predictions are good enough.
- test(input): Test input data.
- test(actual): Test actual data.
-
prediction(test): The model's prediction given the test input. There's only one prediction from the last row (or the last sliding window) of the test input which corresponds to 1, 2, 7 days later after 'test(input)'.
MLP predicts the increases percentage of air passengers as described in capturing trends for prediction. Number of hidden layers,
dimensions, dropout rates, etc. were determined by grid search.