Forecasting medium-term electricity demand in a South African electric power supply system


  • Caston Sigauke



Elastic net, electricity demand, generalized additive models, LASSO


The paper discusses an application of generalised additive models (GAMs) in predicting medium-term hourly electricity demand using South African data for 2009 to 2013. Variable selection was done using least absolute shrinkage and selection operator (Lasso) via hierarchical interactions, resulting in a model called GAM-Lasso. The GAM-Lasso model was then extended by including tensor product interactions to yield a second model, called GAM- -Lasso. Comparative analyses of these two models were done with a gradient-boosting model to act as a benchmark model and the third model. The forecasts from the three models were combined using a forecast combination algorithm where the average loss suffered by the models was based on the pinball loss function. The results showed significantly improved accuracy of forecasts, making this study a useful tool for decision-makers and system operators in power utility companies, particularly in maintenance planning including medium-term risk assessment. A major contribution of this paper is the inclusion of a nonlinear trend. Another contribution is the inclusion of temperature based on two thermal regions of South Africa.


Download data is not yet available.


Metrics Loading ...


Bates, J.M. and Granger, C.W.J. The combination of forecasts. Operational Research, 1969, 20(4): 451– 468.

Bien, J., Taylor, J. and Tibshirani, R. A Lasso for hierarchical interactions. Annals of Statistics, 2013, 41(3): 1111–1141.

Chikobvu, D. and Sigauke, C. Modelling influence of temperature on daily peak electricity demand in South Africa. Journal of Energy in Southern Africa, 2013, 24(4): 63–70.

Clemen, R.T. Combining forecasts: A review and annotated bibliography. International Journal of Forecasting, 1989, 5: 559–583.

Debba, P., Koen, R., Holloway, J.P., Magadla, T., Rasuba, M., Khuluse, S. and Elphinstone, C.D. 2010.

Forecasts for electricity demand in South Africa (2010–2035) using the CSIR sectoral regression model. Available online at irp%20files/CSIR_model_IRP%20forecasts% 202010_final_v2.pdf

Devaine, M., Gaillard, P., Goude, Y. and Stoltz, G. Forecasting the electricity consumption by aggregating specialized experts: A review of sequential aggregation of specialized experts, with an application to Slovakian and French country-wide one-day-ahead (half-) hourly predictions. Machine Learning, 2012, 90: 231–260.

Fan, S. and Hyndman, R.J. Short-term load forecasting based on a semi-parametric additive model. IEEE Transactions on Power Systems, 2012, 27(1): 134–141.

Fasiolo, M., Goude, Y., Nedellec, R. and Wood, S. N. Fast calibrated additive quantile regression, 2017. Available online at (accessed 10 November 2017).

Friedman, J.H. Multivariate adaptive regression splines. The Annals of Statistics, 1991, 19(1): 1–141.

Friedman, J., Hastie, T., Simon, N. and Tibshirani, R. Lasso and elastic-net regularized generalized linear models: glmnet r package version 2.0-10, 2017. Available online at packages/glmnet/glmnet.pdf (Accessed on 7 May March 2017).

Gaillard, P. Contributions to online robust aggregation: Work on the approximation error and on probabilistic forecasting. PhD Thesis, 2015, University Paris-Sud, France.

Gaillard, P., Goude, Y. and Nedellec, R. Additive models and robust aggregation for GEFcom2014 probabilistic electric load and electricity price forecasting. International Journal of forecasting, 2016, 32: 1038-1050.

Goude, Y., Nedellec, R. and Kong, N. Local short and middle term electricity load forecasting with semi-parametric additive models. IEEE Transactions on Smart Grid, 2014, 5(1):440- 446.

Hastie T. and Tibshirani, R. Generalized additive models (with discussion). Statistical Science, 1986, 1: 297–318.

Hastie, T. and Tibshirani, R. Generalized additive models, 1990, Chapman & Hall.

Hong T. and Fan S. Probabilistic electric load forecasting: A tutorial review. International Journal of

Forecasting, 2016, 32: 914–938.

Hong, T., Pinson, P., Fan, S., Zareipour, H., Troccoli, A. and Hyndman, R.J. Probabilistic energy forecasting: Global Energy Forecasting Competition 2014 and beyond. International Journal of Forecasting, 2016; 32(3): 896–913.

Hyndman, R.J. and Fan, S. Density forecasting for long-term peak electricity demand, IEEE Transactions on Power Systems, 2010, 25(2): 1142–1153.

Hyndman, R.J. and Athanasopoulos, G. Forecasting: principles and practice, 2013. Available online at (accessed 26 March 2017).

Hyndman, R.J. forecast: Forecasting functions for time series and linear models. R package version 8.1, 2017. Available online at

Laurinec P. Doing magic and analyzing seasonal time series with GAM (Generalized Additive Model) in R, 2017. Available online at Analyzing-double-seasonal-time-series-with-GAM-in-R/ (accessed 23 February 2017).

Meier, L., van de Geer, S. and Bu ̈hlman, P. The group lasso for logistic regression. Journal of the Royal Statistical Society B, 2008, 70(1): 53–71.

Munoz, A., Sanchez-Ubeda, E.F., Cruz, A. and Marin, J. Short-term forecasting in power systems: a guided tour. Energy Systems, 2010, 2: 129–160.

Pierrot, A. and Goude, Y. Short-term electricity load forecasting with generalized additive models. Proceedings of ISAP Power, 2011: 593–600.

Sigauke, C. and Chikobvu, D. Short-term peak electricity demand in South Africa. African Journal of Business Management. 2012, 6(32): 9243–9249.

Sigauke, C., Verster, A. and Chikobvu, D. Extreme daily increases in peak electricity demand: Tail-quantile estimation. Energy Policy, 2013, 53: 90–96.

Shaub, D. and Ellis, P. Convenient functions for ensemble time series forecasts. R package version 1.1.9, 2017. Available online at web/packages/forecastHybrid/forecastHybrid.pdf.

Simpson, G. Modelling seasonal data with GAMs, 2014. Available online at (accessed 26 February 2017).

Takeda, H., Tamura, Y. and Sato, S. Using the ensemble Kalman filter for electricity load forecasting and analysis. Energy, 2016, 104: 184–198.

Tibshirani, R. Regression shrinkage and selection via lasso. Journal of the Royal Statistical Society. Series B (methodology), 1996, 58(1): 267–288.

Van Buuren, S. and Groothuis-Oudshoorn, K. MICE: Multivariate imputation by chained equations in R. Journal of Statistical Software, 2011, 45(3): 1–67.

Wheeler M.W. Bayesian additive adaptive basis tensor product models for modelling high dimensional

surfaces: An application to high-throughput toxicity testing, 2017. Available online at 1702.04775 (accessed 4 April 2017).

Wood, S. Generalized additive models: An introduction with R, 2006, London: Chapman and Hall.

Wood, S. MGCV r package, version 1.8-17, 2017. Available online at (accessed 15 February 2017).

Wood, S. P-splines with derivative based penalties and tensor product smoothing of unevenly distributed data. Statistics and Computing, 2017, 27: 985–989.

Xie, J., Hong, T. and Kang, C. From high-resolution data to high-resolution probabilistic load forecasts. Transmission and Distribution Conference and Exposition, IEEE/PES, 2016 DOI: 10.1109/TDC.2016.7520073.

Yuan, M. and Lin, Y. Model selection and estimation in regression with grouped variables. Journal of Royal Statistical Society Series B, 2006, 68: 49–67.

Ziel, A. Modelling and forecasting electricity load using Lasso methods. Modern Electric Power Systems, 2016. DOI: 10.1109/MEPS.2015.7477217.

Ziel, F. and Liu B. Lasso estimation for GEFCom2014 probabilistic electric load forecasting. International Journal of Forecasting, 2016, 32: 1029-1037.

Zou, H. and Hastie, T. Regularization and variable selection via the elastic net. Journal of the Royal Statistical Society. Series B (methodology), 2005, 67(2): 301–320.




How to Cite

Sigauke, C. (2017). Forecasting medium-term electricity demand in a South African electric power supply system. Journal of Energy in Southern Africa, 28(4).