View the Project on GitHub NyanoNyan/-EDA-and-Forecasting-on-weekly-petrol-and-diesel-data
Jupyternotebook links:
Details about the data:
For this section, I looked took the petrol pump price data over time and used bi-directional LSTM model to fit and predict future values of weekly petrol data in the UK.
In this section, I did not implement de-trending to view how the results would fare compared to detrending the data. A univariate approach was used for this, as when additional features such as petrol_duty_rate, petrol_vat_percent_rate, and Year were added, it did not improve the model. However, this model can be adapted to a multivariate time series, by feeding it x columns data and changing the num_x to numbers of features.
Furthermore, 90% (841 values) of the data was used for training and 5% (37 values) was used for testing.
Training and testing loss:
Train MSE: 5.102
Test MSE: 10.504
Predicting the future:
7 weeks into the future shows there is going to be a downwards trend in the petrol price in the following weeks.
For this section, I looked took the petrol pump price data over time and used bi-directional LSTM model to fit and predict future values of weekly petrol data in the UK.
I also applied detrending before fitting the model as in papers it was a recommended step for pre-processing. Also, due to detrending, this will make the data stationary which will allow the model to train well..
A univariate approach was used for this, as when additional features such as petrol_duty_rate, petrol_vat_percent_rate, and Year were added, it did not improve the model. However, this model can be adapted to a multivariate time series, by feeding it x columns data and changing the num_x to numbers of features.
The cross-validation for this data set was changed a little bit. 90% (841 values) of the data was used for training and 8% (71 values) was used for testing. Lastly, 2% of the data (11 values) were used to test unknown future values.
Training and testing loss:
Predicted and Actual values on the Training set:
Predicted and Actual values on the Test set:
Train MSE: 0.679
Test MSE: 0.571
Future predictions: