## 4 Comparisons  
In this section, we compare steepest descent (SD), steepest descent with mini-batches (SDMB) from [9; 10; 11; 12], the Hessian (H) from [17; 18; 19; 20], and the Hessian with mini-batches (HMB) from this investigation for electrical demand prediction. The goal of these algorithms is that the neural network output \(q_{l}\) must reach the target \(t_{l}\) as soon as possible.  
Efficient electrical demand prediction is critical for acceptable operations and planning with the intention of achieving profits. The load forecast influences a series of decisions, including the generators to be used for a given period, and influences the wholesale prices and the market prices in the electrical sector.  
The training data used were a table with the history of electrical demand for each hour and temperature observations provided by the International Organization for Standardization (ISO) of Great Britain. The meteorological information includes the dry bulb temperature and the dew point. We took into account the data of the hourly electrical demand.  
For the electrical demand prediction, we took into account eight characteristics to tune the neural network:  
* The dry bulb temperature;
* The dew point;
* Hour of the day;
* Day of the week;
* A mark indicating if this is a free or a weekend day;
* Medium load of the past day;
* The load of the same hour, in the past day;
* Load of the same hour, the same day of the past week.  
Further, we utilized the load of the same day as the target.  
1. Using the training data (\(34800\times 8\)), we trained the neural network for electrical demand prediction. After the training stage of the neural network, we used 8770 datapoints for the testing for each characteristic, yielding a matrix with dimensions (\(8770\times 8\))The neural network had three layers--one input layer, one hidden layer, and one output layer. The input layer had eight neurons, the hidden layer had six neurons, and the output layer had one neuron.  
We obtained neural network tuning by using the Hessian with the following steps:  
1. We initialized the scale parameters with random values between 0 and 1;
2. We obtained the forward propagation;
3. We obtained the cost map;
4. We obtained the back propagation;
5. We utilized the Hessian tuning.  
To evaluate the tuning of the neural network, we employed the determination coefficient (\(R^{2}\)), the mean absolute error (\(MAE\)), and the mean absolute percent error (\(MAPE\)), determined as follows:  
\[\begin{array}{c}R^{2}=1-\frac{\sum\limits_{l=1}^{L_{T}}(q_{l}-\overline{t_{l }})^{2}}{\sum\limits_{l=1}^{L_{T}}(t_{l}-\overline{t_{l}})^{2}}\\ MAE=\sum\limits_{l=1}^{L_{T}}\left|q_{l}-t_{l}\right|\\ MAPE=\frac{100}{L_{T}}\sum\limits_{l=1}^{L_{T}}\left|q_{l}-t_{l}\right|\end{array} \tag{25}\]  
where \(q_{l}\) is the neural network output, \(t_{l}\) is the target, and \(\overline{t_{l}}\) is the mean of the target. \(R^{2}\) generates values from 0 to 1; \(L_{T}\) is the total output number. If a method provides good tuning, it has \(R^{2}\) values near to 1, and if a method provides bad tuning, it has \(R^{2}\) values near to 0. If a method provides good tuning, it has \(MAE\) values near to 0 MWh, and if a method provides good tuning, it has \(MAPE\) values near to 0%. We also used the cost map \(E\) (2) to evaluate the tuning of the neural network. If a method provides good tuning, it has \(E\) values near to 0.