## Appendix A Implementation of the Proposed Scheme
### Incremental Computation for Linear Regression  
In this sub-section, we show that the incremental computation of linear regression of our scheme is correct. Assume that a user \(A\) first collected a set of \(n_{1}\) data and then a set of \(n_{2}\) data. These data are shown in Table 11:  
In Table 11, as well as other data tables in this section, the last column is \(y_{i}\). The solution obtained by using the least square method on these 20 data is listed as follows. In the list of the solutions of the parameters, the number in the parentheses is the theoretical value. \[\beta_{0} =2.48223\left(2\right)\] \[\beta_{1} =0.943394\left(1\right)\] \[\beta_{2} =-1.99831\left(-2\right)\] \[\beta_{3} =3.04756\left(3\right)\] \[\beta_{4} =2.01561\left(2\right)\] \[\beta_{5} =-1.00936\left(-1\right)\] \[\beta_{6} =1.99996\left(2\right)\] \[\beta_{7} =2.53073\left(2.5\right)\]  
Suppose that \(A\) collected another set of data \(A_{2}\) with \(n_{2}=10\) data as shown in Table A2: \begin{tabular}{c c c c c c c c} \hline \(x_{0}\) & \(x_{1}\) & \(x_{2}\) & \(x_{3}\) & \(x_{4}\) & \(x_{5}\) & \(x_{6}\) & \(x_{7}\) & \(y\) \\ \hline \(1\) & \(10.65\) & \(-47.49\) & \(9.25\) & \(12.57\) & \(9.24\) & \(35.2\) & \(-1.66\) & \(217.627\) \\ \hline \(1\) & \(10.88\) & \(14.43\) & \(-2.51\) & \(45.02\) & \(-9.74\) & \(-19.05\) & \(-37.63\) & \(-56.4756\) \\ \hline \(1\) & \(-49.31\) & \(13.31\) & \(-4.27\) & \(23.7\) & \(-33.26\) & \(35.17\) & \(-33.26\) & \(-15.32\) \\ \hline \(1\) & \(-30.9\) & \(-19.26\) & \(11.48\) & \(25.9\) & \(41.91\) & \(-15.09\) & \(24.77\) & \(86.6076\) \\ \hline \(1\) & \(47.06\) & \(0.63\) & \(24.81\) & \(7.71\) & \(-33.33\) & \(47.58\) & \(33.8\) & \(352.092\) \\ \hline \(1\) & \(25.91\) & \(-3.7\) & \(-17.86\) & \(-49.69\) & \(-39.27\) & \(-6.85\) & \(8.85\) & \(-68.6693\) \\ \hline \(1\) & \(-35.49\) & \(24.1\) & \(21.22\) & \(-34.79\) & \(-49.06\) & \(-33.04\) & \(2.43\) & \(-97.2314\) \\ \hline \(1\) & \(31.2\) & \(15.65\) & \(19.18\) & \(13.82\) & \(46.4\) & \(-19.34\) & \(-10.27\) & \(-24.3336\) \\ \hline \(1\) & \(1.83\) & \(-20.91\) & \(28.02\) & \(-37.59\) & \(-6.75\) & \(2.83\) & \(20.12\) & \(113.153\) \\ \hline \(1\) & \(9.92\) & \(0.41\) & \(3.92\) & \(49.35\) & \(46.71\) & \(-0.42\) & \(13.18\) & \(107.252\) \\ \hline \end{tabular}   
The solutions obtained by using the least square method on these \(10\) data is:  
\[\beta_{0} =2.98339\left(2\right)\] \[\beta_{1} =0.974087\left(1\right)\] \[\beta_{2} =-1.94836\left(-2\right)\] \[\beta_{3} =2.92537\left(3\right)\] \[\beta_{4} =2.01187\left(2\right)\] \[\beta_{5} =-1.00548\left(-1\right)\] \[\beta_{6} =2.03572\left(2\right)\] \[\beta_{7} =2.53478\left(2.5\right)\]  
It can be seen that the solutions for each dataset are not accurate enough. These two datasets need to be combined to obtain a more accurate linear regression model. The two datasets can be computed incrementally by using our proposed scheme. The solutions  
The solution obtained by using the least square method only on \(B\)'s dataset is:  
\[\beta_{0} =1.70711\left(2\right)\] \[\beta_{1} =0.959823\left(1\right)\] \[\beta_{1} =0.974087\left(1\right)\]0 \[\beta_{1} =0.974087\left(1\right)\]1 \[\beta_{1} =0.974087\left(1\right)\]2 \[\beta_{1} =0.974087\left(1\right)\]3 \[\beta_{1} =0.974087\left(1\right)\]4 \[\beta_{1} =0.974087\left(1\right)\]5  
If we use the proposed scheme to combine the two datasets collected by \(A\) and \(B\), we can obtain better model parameters:  
\[\beta_{1} =0.974087\left(1\right)\]6 \[\beta_{1} =0.974087\left(1\right)\]7 \[\beta_{1} =0.974087\left(1\right)\]8 \[\beta_{1} =0.974087\left(1\right)\]9 \[\beta_{2} =-1.94836\left(-2\right)\]0 (A1) \[\beta_{2} =-1.94836\left(-2\right)\]1 \[\beta_{2} =-1.94836\left(-2\right)\]2 \[\beta_{2} =-1.94836\left(-2\right)\]3  
To verify the correctness of our proposed collaborative learning scheme, we also try to first combine the two datasets and then calculate the solutions.