Skip to content
Rebecca Pontes Salles edited this page Apr 29, 2017 · 2 revisions

The EUNITE Competition Experiment

The EUropean Network on Intelligent TEchnologies for smart adaptive systems classification (EUNITE) competition (EUNITE 1999, Chen et al. 2004) was interested in solving the problem of predicting the maximum daily electrical loads for January 1999 based on the real values of half-an-hour loads and average daily temperatures measured between 1997 and 1998. The list of holidays with respect to this time period (1997-1998) and the ones of January 1999 were also provided to competitors. This competition provided over 35,000 data points.

Furthermore, use of additional data corresponding to the measured average daily temperatures for the time period 1995-1996 was allowed. This additional data is particularly helpful to the necessary task of predicting the daily average temperatures of January 1999. Fig. 1 and Fig. 2 correspond to the maximum daily electrical loads for the years 1997 and 1998, and the average daily temperatures measured since 1995 until 1998, respectively.

EUNITE Competition datasets generally present considerable seasonality due to properties of electrical load demand, climate influence and holiday effects, among other reasons.

Based on these datasets, each competitor was asked to predict the next 31 data values corresponding to a month’s daily maximum electrical loads.

Fig. 1 Time series contained within the EUNITE Competition Dataset with the maximum daily electrical loads measured since 1997 until 1998

Fig. 2 Time series contained within the EUNITE Competition Dataset with the average daily temperatures measured since 1995 until 1998

The performance evaluation done by the EUNITE Competition was based on the MAPE error and on the MAXIMAL error of prediction found by the competitors.

For the posed prediction problem, it was generated a single time series of the maximum daily electrical loads from the provided half-an-hour loads measured in the years 1997 and 1998. It was also used all the available data regarding the temperatures and holidays.

From this given data, it was also derived another input series corresponding to the weekday, which is expected to have an impact on the electrical consumption.

The EUNITE Competition complete datasets are present in TSPred R-Package. The provided half-an-hour loads measured between 1997 and 1998 are referenced as EUNITE.Loads, and the respective data on the inputs relative to the holidays and weekdays is referenced as EUNITE.Reg. The average daily temperatures measured between 1995 and 1998 are referenced as EUNITE.Temp.

The continuation values of these datasets with respect to January 1999 are also present in TSPred R-Package and are referenced as EUNITE.Loads.cont, EUNITE.Reg.cont, EUNITE.Temp.cont, respectively.


Experiment R-Script

#Load the datasets EUNITE.Loads, EUNITE.Loads.cont, EUNITE.Reg, EUNITE.Reg.cont and EUNITE.Temp
> data(EUNITE.Loads, EUNITE.Loads.cont, EUNITE.Reg, EUNITE.Reg.cont, EUNITE.Temp)

#Automatically fits an ARIMA model to EUNITE.Temp and predicts the next 31 values
> temp.pred <- marimapred(EUNITE.Temp,n.ahead=31)

#Prepares the input data
#Selects the temperature input data relative to EUNITE.Loads and binds it to the other input variables in EUNITE.Reg
> reg <- cbind(tail(EUNITE.Temp,nrow(EUNITE.Loads)),EUNITE.Reg)
#Binds the temperature predictions to the other input variables in EUNITE.Reg.cont
> newreg <- cbind(data.frame(temp.pred),EUNITE.Reg.cont)

#Generates a single time series of the maximum daily electrical loads
> MaxLoads <- apply(EUNITE.Loads, 1, max)
#Generates a single time series of the continuation values of MaxLoads which were to be predicted
> MaxLoadsCont <- apply(EUNITE.Loads.cont, 1, max)

#Automatically fits an ARIMA model to MaxLoads and predicts the values in MaxLoadsCont
> pred <- marimapred(data.frame(MaxLoads),data.frame(MaxLoadsCont),xreg=list(reg),newxreg=list(newreg), plot=TRUE,
ylab="Max load [MW]", xlab="Day", main="Prediction of Maximum Daily Values of Electrical Loads for January 1999")

#Calculates the MAPE and the maximal error of prediction between pred and MaxLoadsCont
> MAPE(MaxLoadsCont,pred)
> MAXError(MaxLoadsCont,pred)
Example of plotted graphic:

Fig. 3 ARIMA predictions (solid line) for the time series contained within the EUNITE Competition Dataset with the maximum daily electrical loads measured in January 1999. The actual time series values are represented by the dashed line.


General R-Function

> ARIMA.EUNITE <- function(TimeSeries, TimeSeriesCont, Temp=NULL, xreg=NULL, newxreg=NULL, plot=FALSE){
    if(is.null(TimeSeries)) stop("TimeSeries is required and must have positive length")
    if(is.null(TimeSeriesCont)) stop("TimeSeriesCont is required and must have positive length")
    
    reg <- xreg
    newreg <- newxreg
    if(!is.null(Temp)){
        reg <- cbind(Temperature=tail(Temp,nrow(TimeSeries)),reg)
        Temp.Pred <- marimapred(Temp,n.ahead=31)
        newreg <- cbind(Temperature=data.frame(Temp.Pred),newreg)
    }
    
    # max of the rows
    MaxLoads <- apply(TimeSeries, 1, max)
    MaxLoadsCont <- apply(TimeSeriesCont, 1, max)
    
    Predictions <- marimapred(data.frame(MaxLoads), data.frame(MaxLoadsCont), xreg=list(reg), newxreg=list(newreg), plot=plot)
    
    mape <- MAPE(MaxLoadsCont,Predictions)
    maxerror <- MAXError(MaxLoadsCont,Predictions)
    
    return (cbind(MAPE=mape,MAXError=maxerror))
}
Example:
> ARIMA.EUNITE(EUNITE.Loads, EUNITE.Loads.cont, EUNITE.Temp, xreg=EUNITE.Reg, newxreg=EUNITE.Reg.cont)

References

EUNITE 1999, Electricity Load Forecast using Intelligent Adaptive Technology: The EUNITE Network Competition. URL: http://neuron.tuke.sk/competition/index.php. Accessed: 5 Feb 2015.

B.-J. Chen, M.-W. Chang, and C.-J. Lin, 2004, Load forecasting using support vector Machines: a study on EUNITE competition 2001, IEEE Transactions on Power Systems, v. 19, n. 4 (Nov.), p. 1821–1830.


Back to TSPred R-Package

Clone this wiki locally