# Edge Federated Optimization for Heterogeneous Data
## 5 Experimental Results
### Performance Evaluation
#### 5.2.7 With Imbalanced Class Distribution  
To further assess the robustness of the pruned models, here we explore system performance with respect to imbalanced class distribution by increasing the distribution variation in the datasets (i.e., changing the ratio among each class 5.28:1:1.1 (the MIT-BIH database) and 5.45:1:1.15 (the St database) in Table 3 to the ratio 4.5:1:1.1 and 7.5:1:1.01, as shown in Table 5). Referring to the experimental results with a less imbalanced class distribution (e.g., Table 3), the FedProx with structured pruning at a pruning rate of 10% achieves the best F1 scores, reaching 96.01% and 77.81% (Figure 11a), respectively. In contrast, Figure 13 depicts that with a more imbalanced class distribution (e.g., Table 5), at a pruning rate of 20%, the FedProx with structured pruning achieved the best F1 scores, reaching 98.46% and 64.14%, respectively. Thus, considering the scenario of an imbalanced class distribution, the results suggest that we may adaptively adjust the pruning ratio to suppress the degradation of pruned model accuracy. Table 6 presents a comparison of model accuracy for MIT-BIH and ST with the FedProx given an imbalanced class distribution.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Figure** & **Database** & **Initial** & **Frozen** & **Unstructured** & **Structured** & **FedAvg** & **FedProx** \\  & & & **Prune** & **Prune** & **F1 Score** & **F1 Score** \\ \hline \multirow{2}{*}{Figure 7} & MIT-BIH & ✔ & & & 0.5682 & 0.6612 \\ \cline{2-6}  & ST & ✔ & & & 0.8580 & 0.8990 \\ \hline \multirow{2}{*}{Figure 8} & MIT-BIH & ✔ & & & 0.7976 & 0.9731 \\ \cline{2-6}  & ST & ✔ & & & 0.9392 & 0.6215 \\ \hline \multirow{2}{*}{Figure 9} & MIT-BIH & ✔ & & & 0.5714 & 0.2797 \\ \cline{2-6}  & ST & ✔ & & & 0.4240 & 0.2778 \\ \hline \multirow{2}{*}{Figure 10a} & MIT-BIH & ✔ & & & 0.6941 & 0.9558 \\ \cline{2-6}  & ST & & ✔ & & 0.8121 & 0.6347 \\ \hline \multirow{2}{*}{Figure 10b} & MIT-BIH & ✔ & & & 0.8875 & 0.9040 \\ \cline{2-6}  & ST & & ✔ & & 0.7275 & 0.5194 \\ \hline \multirow{2}{*}{Figure 10c} & MIT-BIH & ✔ & & & 0.7113 & 0.7923 \\ \cline{2-6}  & ST & & ✔ & & 0.8656 & 0.4769 \\ \hline \multirow{2}{*}{Figure 11a} & MIT-BIH & ✔ & & & 0.5404 & 0.9601 \\ \cline{2-6}  & ST & & & ✔ & 0.8325 & 0.7781 \\ \hline \multirow{2}{*}{Figure 11b} & MIT-BIH & ✔ & & & 0.4843 & 0.9061 \\ \cline{2-6}  & ST & & & ✔ & 0.6157 & 0.6348 \\ \hline \multirow{2}{*}{Figure 11c} & MIT-BIH & ✔ & & & 0.7991 & 0.7931 \\ \cline{2-6}  & ST & & & ✔ & 0.7801 & 0.5881 \\ \hline \multirow{2}{*}{Figure 11d} & MIT-BIH & ✔ & & & 0.4270 & 0.8290 \\ \cline{2-6}  & ST & & & ✔ & 0.4086 & 0.6539 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Comparison of model optimization for MIT-BIH and ST databases.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Prune** & **Dataset** & **Initial** & **Frozen** & **Unstructured Prune** & **Structured Prune** & **FedProx F1 Score** \\ \hline \multirow{2}{*}{10\%} & MIT-BIH & & & & 0.9422 \\ \cline{2-6}  & ST & & & & 0.6250 \\ \hline \multirow{2}{*}{20\%} & MIT-BIH & & & & 0.9846 \\ \cline{2-6}  & ST & & & & 0.6414 \\ \hline \multirow{2}{*}{40\%} & MIT-BIH & & & & 0.9892 \\ \cline{2-6}  & ST & & & & 0.9892 \\ \cline{2-6}  & ST & & & & 0.5097 \\ \hline \multirow{2}{*}{60\%} & MIT-BIH & & & & 0.9788 \\ \cline{2-6}  & ST & & & & 0.4922 \\ \hline \multirow{2}{*}{80\%} & MIT-BIH & & & & 0.9848 \\ \cline{2-6}  & ST & & & & 0.6087 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Comparison of model optimization for MIT-BIH and ST with an imbalanced dataset.  
Figure 13: Confusion matrix comparison of model performance at 10%, 20%, 40%, 60%, and 80% structured pruning rates with an imbalanced dataset.  
\begin{table}
\begin{tabular}{c c c} \hline \hline  & **MIT-BIH** & **St Petersburg INCART** \\ \hline N & 26,861 & 29,852 \\ A & 5907 & 3955 \\ V & 6808 & 4009 \\  & 4.5:1:1.15 & 7.5:1:1.01 \\ \hline \hline \end{tabular}
\end{table}
Table 5: The proportion distribution of N, A, and V data with an imbalanced dataset.