# Enhancing Energy Efficiency in Retail within Smart Cities through Demand-Side Management Models
## 4 Experience Result
### Proposed Analysis and Prediction Methods
This study uses a back-propagation neural network (BPNN) for electricity consumption prediction, which has been widely adopted by many researchers for predictive analysis. Like other deep learning models, a BPNN consists of an input layer, hidden layer, and output layer. The BPNN uses the hidden layer to convert the independent variables from the input layer into a nonlinear function. The output layer then further transforms the nonlinear function from the hidden layer. By repeating this process and undergoing repeated learning, the BPNN can generate a prediction model. BPNNs have been applied in various fields of research [44; 45; 46]. In this study, due to its small-scale nature, the choice to use a back-propagation neural network (BPNN) over long short-term memory (LSTM) for electricity consumption prediction analysis is based on the following factors:  
* Data Volume and Characteristics: The dataset is relatively small, and the time series data have limited length, making a BPNN more suitable than LSTM. LSTM requires more data to capture long-term dependencies in time series, and in some cases, a BPNN may exhibit more robust performance on small datasets. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Variables** & **Types of Retail** & **Number of Stores** \\ \hline R1\(\sim\)R4 & convenience stores & 4 \\ \hline R5\(\sim\)R6 & department stores & 2 \\ \hline R7 & supermarket & 1 \\ \hline R8 & hotel & 1 \\ \hline R9\(\sim\)R17 & restaurants & 9 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The types and numbers of retail stores in the DSM aggregator model. * Model Complexity: LSTM, being a variant of a recurrent neural network (RNN), can handle both long-term and short-term dependencies, but it comes with higher model complexity. In this study with a small dataset, the simpler structure of BPNN may be easier to implement and adjust. * Adaptability to the Problem: BPNN, in the context of electricity consumption prediction, is more focused on capturing rapid changes and real-time trends. The iterative learning and updating pattern of BPNN may be better suited for the specific requirements of the electricity prediction problem in this study. In this study, the network parameters include the learning rate, momentum, number of training iterations, and acceptable error range. Next, we will set up the network architecture and parameters, and initialize the network's weight values _W_xh_, _W_y_y_, and bias values _\(\theta\_h\)_ and _\(\theta\_y\)_ with uniformly distributed random numbers. The calculation steps for the hidden layer's output during the training phase are described simply, without complicated mathematical formulas. The formula is as follows:  
\[net_{h}=\sum_{i}W\_xh_{i\!i}\cdot X_{i}-\theta\_h_{h} \tag{1}\]  
\[H_{h}=f\big{(}net_{j}\big{)}=\frac{1}{1+\exp^{-net_{h}}} \tag{2}\]  
The calculation formula for the output value of the inference in the output layer is as follows:  
\[net_{j}=\sum_{h}W\_hy_{ij}\cdot H_{h}-\theta\_y_{j} \tag{3}\]  
\[Y_{j}=f\big{(}net_{j}\big{)}=\frac{1}{1+\exp^{-net_{j}}} \tag{4}\]  
In this study, the focus lies on exploring the training process of a neural network model with various network parameters, including the learning rate, momentum, number of training iterations, and acceptable error range. The network architecture and parameters are established, and the weight values and bias values of the network are initialized with uniformly distributed random numbers. The study introduces the formulas for calculating the output values of the inference in both the output and hidden layers. The delta (8) difference between the output and hidden layers is calculated using specific formulas for each layer. Correction values for the weighted value and bias value of the hidden layer are derived, and the weight values and bias values for both the output and hidden layers are updated until the network converges. (1) and (2) represent the calculation steps for the hidden layer's output during the training phase.