# Differentially Private Clustered Federated Load Prediction Based on the Louvain Algorithm
## 7 Analysis of Arithmetic Examples
### Analysis of Simulation Results  
After calculating the similarity, the Louvain algorithm is applied to classify the associations in the weighted network, and the results are displayed in Figure 4.  
During the operation, the \(Q\)-values are as follows: \(-\)0.0832, 0.1569, \(-\)0.0275, 0.3124, 0.2017, 0.4753, 0.3695, 0.5936, 0.4821, 0.6427, 0.5339, 0.7052, 0.6185, 0.7514, 0.6793, 0.7836, 0.7253, 0.7453, 0.7292, and 0.7217. After reaching a peak value of 0.7836, the \(Q\)-value begins to decline. At this point, the optimal division results in one association clustering for users 1, 2, 8, 10, and 11, and another for users 3, 4, 5, 6, 7, 9, 12, 13, 14, and 15. Compared to commonly used clustering algorithms, such as K-Means, CFL, and IFCA, our proposed method has lower computational costs and does not require pre-specifying the number of clusters. The comparison results of the DP-FedAvg and pADP-FedAvg algorithms across the three evaluation metrics--MSE, RMSE, and MAPE--are presented in Table 3. With a privacy budget of \(\epsilon=0.6\), it is clear that the pADP-FedAvg algorithm significantly enhances the accuracy of the classical DP-FedAvg algorithm and demonstrates superior performance. Due to the introduction of random noise, the DP noise degrades model performance. Compared with a traditional DP strategy, this suggests that our approach significantly mitigates the negative effects of DP on the model. The model performance comparison, as shown in Table 4, evaluates three models under different privacy budgets: the traditional global model, personalized cluster model 1, and personalized cluster model 2. The results indicate that the traditional global model exhibits the lowest accuracy, while the personalized cluster models demonstrate high performance at the same privacy budget. As the privacy budget \(\epsilon\) increases, the loss metrics (MSE, RMSE, and MAPE) decrease, leading to higher model accuracy; however, this also results in reduced privacy protection. Conversely, a smaller privacy budget \(\epsilon\) provides greater privacy protection but results in lower prediction accuracy. Figure 4: The community division results of the Louvain algorithm. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Algorithm** & **MSE** & **RMSE** & **MAPE** \\ \hline DP-FedAvg & 0.278 & 0.527 & 33.5 \\ pADP-FedAvg & 0.205 & 0.452 & 29.3 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Comparison of algorithm performance. Figure 5 illustrates a comparison of the prediction curves under different privacy-preserving budgets. The experimental results indicate that both models, cluster 1 and cluster 2, exhibit strong prediction performance. When the privacy budget is set higher, their prediction curves align more closely with the true value curves, although this comes at the expense of privacy protection. These findings highlight the trade-off between the privacy-preserving budget and prediction accuracy. In practical applications, it is essential to balance privacy risks and model performance based on specific scenarios to determine the appropriate privacy budget settings. We know that the smaller the privacy budget setting in DP, the better the privacy protection, and the worse the prediction accuracy. Through vertical comparison, under the same privacy budget, the clustered federated load prediction achieves better prediction performance than the global model, which means that our proposed system can achieve a better trade-off between privacy protection and prediction performance.