# A Federated Generalized Linear Model for Privacy-Preserving Analysis
## 3 Results and Discussion  
Table 1 shows a comparison between the results of the centralized and the federated GLMs. We can see that in all cases, the output of both types of models is practically identical. This demonstrates that our implementation of a federated GLM is capable of generating an  
equivalent model of that using a centralized approach but without the need of sharing any data among the involved parties. After this, we were confident that the results of our federated GLM were practically identical to those of its centralized counterpart. Thus, we proceeded to validate its execution time. Figure 2 shows the execution time as a function of the _total_ number of records in a fixed three-party scenario. For all three families, we can see that the execution time remains relatively constant from 30 until 30,000 records. In this case, the execution time of the linear model is \(\sim\)0.5 s, while for both logistic and Poisson families, it is \(\sim\)5 s. However, there is a large increase after that, with the linear family having approximately a 10\(\times\) increase reaching \(\sim\)5 s and the logistic and Poisson families having approximately a 6\(\times\) increase reaching \(\sim\)30 s.  
Figure 3 shows the execution time as a function of the number of parties while keeping the total number of records constant (at 10,000). We can see that for all three families, there is a constant increase in execution time as a function of the number of parties. This makes sense, since a larger number of parties implies a larger number of communications between them and the server for each iteration of the algorithm. The linear family still remains as the fastest model by far, which is followed by the logistic and Poisson families. \begin{table}
\begin{tabular}{l l c c c c c c c c} \hline \hline \multirow{2}{*}{**Family**} & \multirow{2}{*}{**Parameter**} & \multicolumn{2}{c}{**Coefficients**} & \multicolumn{2}{c}{**Std. Error**} & \multicolumn{2}{c}{\(p\)**-Values**} & \multicolumn{2}{c}{\(z\)**-Values**} \\ \cline{3-10}  & & **C** & **F** & **C** & **F** & **C** & **F** & **C** & **F** \\ \hline \multirow{3}{*}{Linear} & (Intercept) & 0.069 & 0.069 & 0.045 & 0.045 & 0.129 & 0.129 & 1.520 & 1.520 \\  & \(x_{1}\) & 0.221 & 0.221 & 0.017 & 0.017 & 0 & 0 & 12.763 & 12.763 \\  & \(x_{2}\) & 0.499 & 0.499 & 0.018 & 0.018 & 0 & 0 & 27.212 & 27.212 \\ \hline \multirow{3}{*}{Poisson} & (Intercept) & 0.595 & 0.595 & 0.021 & 0.021 & 0 & 0 & 28.465 & 28.465 \\  & \(x_{1}\) & 0.269 & 0.269 & 0.007 & 0.007 & 0 & 0 & 37.220 & 37.220 \\  & \(x_{2}\) & 0.446 & 0.446 & 0.007 & 0.007 & 0 & 0 & 62.566 & 62.566 \\ \hline \multirow{3}{*}{Logistic} & (Intercept) & 0.104 & 0.104 & 0.064 & 0.064 & 0.106 & 0.106 & 1.617 & 1.617 \\  & \(x_{1}\) & 2.593 & 2.593 & 0.093 & 0.093 & 0 & 0 & 27.802 & 27.802 \\ \cline{1-1}  & \(x_{2}\) & \(-\)0.054 & \(-\)0.054 & 0.051 & 0.051 & 0.291 & 0.291 & \(-\)1.055 & \(-\)1.055 \\ \hline \hline \end{tabular} \(C\): centralized; F: federated.  
\end{table} 
Table 1: Comparison of the centralized vs. federated GLMs  
Figure 2: Execution time for the different families (linear, Poisson, logistic) of the GLM. In this case, the number of parties was kept constant (at 3), while the _total_ number of records went from 30 to 3,000,000 with increasing order of magnitude. Thus, the scale of the \(x\)-axis is logarithmic. Each scenario was simulated 100 times. Data points represent the mean of the execution time, while error bars represent \(\pm\)1 standard deviation. The lines of each family were slightly shifted along the \(x\)-axis to avoid overlap between them. We should mention that the execution times shown here are just indicative and can only provide an idea of how the algorithm escalates with increasing numbers of records/parties. However, these times will very likely be different when used in a real-life scenario due to a variety of reasons. First of all, this study was performed using a mock server-client architecture, which simulates a server and the nodes in a local environment.