Monday 31 October 2011

Single GPs prediction for Carbon Intensity - Results

Taking the first 14 days as a training data set (from 27/06/2011 to 10/07/2011), I apply Single GPs to predict Carbon Intensity for the UK in the next 30 days (from 11/07/2011 to 10/08/2011). It generates a result, which can be seen from the picture below:
Single GPs for Carbon Intensity in the UK from 27/06/2011 to 11/08/2011.


I use the constant hyperparameter set of [-1.1112; -0.4744; 9.7377; -0.2624; -0.6790; -0.2624; -0.5132; -0.8945; -1.1858; -0.8945; -2.9447] to generate this result. The Mean Squared Error (MSE) for this period is 2233.

Moving on to the user consumption prediction, the file of user's consumption has two column: date&time, and the usage. The user usage is recorded every two minutes, as a result each day supposed to contain 720 values. However, there are some values missing in some specific days. For example, in 'ecenergy23@ecs.soton.ac.uk.csv', it only has 712 values on 09/09/2011 (8 values missing), and 719 values on 11/09/2011 (1 value missing). It could be more because I have not checked them all.

Thus, to apply GPs for user consumption, we firstly need to fill the missing value to make sure that it has a full 720 values for each day. Currently, the date & time column is in a format of 'dd/MM/yyyy hh:mm:ss'. We might need to convert the time, which is "hh:mm:ss" to the number of minutes for that day. The value now should be "dd/mm/yyyy A", where A = hh * 60 + mm (we do not consider seconds as it is always zero value). The x-axis now can be represented by A/1440.

Saturday 29 October 2011

Single GPs prediction for Carbon Intensity.

Feeling a bit weird to come back and write this blog after having away for such a long time now, however it might be necessary to keep up my work. 

At the moment, I have spent time to understand and implement Gaussian Processes (GPs) to predict the UK's Carbon Intensity and User's consumption in particular. It is not easy to write a polished code in Matlab as I haven't used it before, so it also takes time to learn. 

Having struggled to apply a complicated covariance function in Matlab, I took a step back to read again the background of GPs from books and other's papers. I finally understand a bit more of how to correctly use GPs. As a result, I have done a Single-GPs predictions on  Carbon Intensity. Here is the results:

1 - My first attempt is to use GPs to predict Carbon Intensity in 30 days ahead.



2 - My second attempt is to use GPs to predict one day-ahead. Then, repeat the process until it predict up to 30 days. It looks better than the one-go 30 days prediction.

In these graphs, the solid blue line represents for the training data, which I took 14 days. The solid red line represents for the actual data, and the dashed black line represents for the predictive data.

To be updated...