*4.6. Updating the Networks*

Backpropagation [32] algorithm was employed for updating the weights of the hidden layer according to the loss function, and "Adam" [33] was selected as the optimizer for finding the convergence path. The loss function we applied in this deep model is Mean Squared Error (MSE) as shown in Equation (25), where *yi* is ground truth electricity consumption and &*yi* is forecasting electricity consumption using the proposed hybrid deep model.

$$MSE = \frac{1}{N} \sum\_{i=1}^{N} (y\_i - \overline{y}\_i)^2 \tag{25}$$

Electricity forecasting using the proposed model is formalized as Equation (26), where *MCSCNN* \_ *LSTM*() is our model, and *x*(*t*) is new history electricity consumption data points.

$$\text{consumption} = \text{MCSCNN\\_LSTM} \left( \mathbf{x}(t)', \text{Statistic} \left( \mathbf{x}(t)' \right) \right) \tag{26}$$
