# Forecasting Electricity Prices: A Machine Learning Approach
## 5 Discussion  
Electricity markets, as an environment for electric utilities, are brutal and non-forgiving. The costs of over-contracting or under-contracting and selling and buying power in the balancing (or real-time) market are typically so high that they can lead to huge financial losses or even bankruptcy. To manage the risk of financial loss, companies apply electricity price forecasting as a fundamental input for decision-making mechanisms. Instead of using black box principles, firms should understand \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  & & & & & & & \\ \cline{2-7}
**LSGP** & **LIN** & **SQ** & **ISO** & **RBF** & **NN** & **SVM** & **SVM2** \\ \cline{2-7}  & **1.21 × 10\({}^{-12}\)** & **1.21 × 10\({}^{-12}\)** & **1.21 × 10\({}^{-12}\)** & **1.21 × 10\({}^{-12}\)** & **1.21 × 10\({}^{-12}\)** & **1.21 × 10\({}^{-12}\)** & **3.83 × 10\({}^{-10}\)** \\ \hline \multicolumn{7}{c}{Test} \\ \hline \multirow{2}{*}{LSGP} & LIN & SQ & ISO & RBF & NN & SVM & SVM2 \\ \cline{2-7}  & **4.72 × 10\({}^{-8}\)** & **4.72 × 10\({}^{-8}\)** & **4.72 × 10\({}^{-8}\)** & **4.72 × 10\({}^{-8}\)** & **4.72 × 10\({}^{-8}\)** & **4.72 × 10\({}^{-8}\)** & **2.59 × 10\({}^{-17}\)** \\ \hline \hline \end{tabular}
\end{table} 
Table 3: P-values returned by the Mann–Whitney test under the alternative hypothesis that the samples do not have equal medians. In particular, the test compared the median MAE obtained by the considered techniques over the 100 runs we performed. **Bold** denotes values indicating a statistical difference among the considered techniques. the model, allowing domain experts to modify or correct the model according to their experience. With this principle, companies can provide an environment for comprehensive in-house knowledge management in the area of electricity price forecasting. In our case, we provided a system for energy market participants as a viable option for addressing the energy price forecasting task, overcoming the main limitations of existing methods. In our paper, we focused on EU electricity markets, as Germany's energy exchange is the leading energy exchange in Central Europe. This represents a limitation but also provides directions for further research. Our goal is to test our findings on other energy markets. Equation (2) is one of the models produced by the semantic GP system. The model is composed of the main factor and a correction factor \(k\) (Equation (3)). The second factor slightly corrects the output of the model, and several variables of the dataset are considered. \[y=2x_{1}+x_{4}+\frac{x_{0}+x_{1}+x_{4}}{x_{1}+2x_{4}+x_{7}}+\frac{5x_{1}+x_{6} +x_{7}}{x_{1}+x_{7}}+\frac{3x_{1}+x_{4}+x_{6}+3x_{7}}{3x_{1}+x_{6}+x_{7}}+0.7978 13\;k \tag{2}\]  
where  
\[ \begin{array}{ll}k&=\frac{1}{-1+e^{-x_{1}3x_{1}+x_{4}}}+\\ &+\frac{1}{e^{-(x_{10}-x_{5}-x_{0}(x_{0}+x_{1})x_{4})((-1+x_{1}x_{3}+x_{5})-( -x_{1}+x_{4}+x_{3}+x_{6}-(x_{1}x_{3}-x_{3}+x_{4})(x_{1}+x_{2}))+(x_{6}+x_{2}(x _{4}-x_{0}))}}.\end{array}  \tag{3}\]  
More interesting from an energy market participant standpoint is the primary factor of the model. Considering its structure and variables, it is possible to extract a better understanding of the variables that play a significant role in the determination of the energy price. Here, \(x_{0}\), \(x_{1}\), \(x_{4}\), \(x_{6}\), and \(x_{7}\) are the main variables used by the system to forecast the spot energy price. Our model shows that the spot electricity price depends on the crude oil spot price (\(x_{0}\)), the settlement price EUR/t CO\({}_{2}\) (\(x_{1}\)), ground temperature (\(x_{4}\)), relative humidity (\(x_{6}\)), and wind speed (\(x_{7}\)). Interestingly, variables \(x_{0}\), \(x_{1}\), and \(x_{4}\) are used in the primary factor of all the models obtained at the end of the experimental phase. On the other hand, the variables from \(x_{8}\) to \(x_{13}\) are never used. A variety of methods and ideas have been applied to electricity price forecasting over the last 15 years, with varying degrees of success [6].