## 3 Example Analysis
### Experimental Analysis and Verification
#### 3.3.3 Daily Load Forecasting Results from Visualization and Comparison Experiment  
Based on clustering, this experiment builds a Bi-LSTM-Attention (BLA) residential electricity consumption prediction model. This model use sliding windows and adds up the electricity consumption of each category. each window size is one week (7 \(\times\) 48). It uses the window data to predict the next day's 24 h (48 o'clock) residential electricity consumption data. The ratio of the training set and the test set is 9:1, the training set has 1577 time points, and the test set has 175 time points. The training accuracy is 0.000001, the maximum number of iterations is 1000, the learning rate is 0.1, and the maximum number of failures is 10 times. The clustering results based on K-Shape clustering into two, three, \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & **MAPE** & **MAE** & **MSE** & **RMSE** & **SMAPE** \\ \hline EMD\_all & 3.01\% & 24.32 & 1862 & 43.15 & 3.82 \\ EMD\_5 & 2.50\% & 20.46 & 3130 & 55.95 & 6.06 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Mode decomposition ablation experimental results. Figure 7: Mode decomposition spectrogram. five, and eight categories are predicted, and the daily load prediction results are shown in Figure 8.  
It can be seen from Figure 4 that the BLA model performs well, and the error of the daily load prediction results after clustering is very small. To verify the effectiveness of the BLA model introduced by the attention mechanism established in this project, an attention mechanism ablation experiment was carried out on the same British power grid residential load data set. The BLA model proposed in this paper is compared with a Bi-LSTM model [40] which does not introduce an attention mechanism. To make the experimental results more convincing, this paper conducts experiments using different cluster center numbers, and the experimental results are shown in Table 4.  
The error percentages of the five clustering numbers of the proposed method and the original Bi-LSTM method are shown in the table. The MAPE of the proposed method in terms of two, three, five, eight, and ten clustering numbers is smaller than that of the original Bi-LSTM method, and the average absolute percentage error is reduced by 0.39%, 1.61%, 0.45%, 0.28%, and 0.63%, respectively. The experiments prove that the proposed model shows good performance in the prediction of this kind of data. The average MAPE of the original Bi-LSTM model is 2.48%, and the average MAPE of the proposed method is 1.85%. To better illustrate the predictive efficiency of the BLA residential electricity consumption prediction model in the above experiments, the relative error and the average error are \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Algorithm** & **MAPE** & **MAE** & **MSE** & **RMSE** & **SMAPE** \\ \hline Bi-LSTM\_2 & 1.88\% & 45.87 & 3560 & 59.67 & 2.84 \\ BLA\_2 & 1.49\% & 23.77 & 2994 & 55.66 & 1.84 \\ Bi-LSTM\_3 & 3.12\% & 34.75 & 1845 & 42.95 & 2.34 \\ BLA\_3 & 1.51\% & 23.75 & 3015 & 40.12 & 2.10 \\ Bi-LSTM\_5 & 2.78\% & 40.80 & 2561 & 50.61 & 2.82 \\ BLA\_5 & 2.33\% & 35.06 & 2503 & 48.16 & 2.62 \\ Bi-LSTM\_8 & 2.32\% & 34.75 & 1845 & 42.95 & 2.34 \\ BLA\_8 & 2.04\% & 28.56 & 1558 & 39.97 & 2.09 \\ Bi-LSTM\_10 & 2.31\% & 65.84 & 6918 & 83.18 & 4.10 \\ BLA\_10 & 1.86\% & 25.69 & 5360 & 72.50 & 3.53 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The load forecasting experimental results with different cluster center numbers. Figure 8: Graph of daily load forecast results. used to test the accuracy of the model. The average absolute percentage error percentage is expressed independently of scale and can be used to compare predictions at different scales. Therefore, the average absolute percentage error is used as the evaluation criterion for the predictive effectiveness of the model, and the confidence is high.