## 4 Modeling the Relationship between Cellular Microwave-Links' (CMLs) Length and Density
### Methodology  
The data set of 3626 observations was split randomly into two, holding out 20% (725) of the observations to be designated as the test set. These observations were not used for model selection or for model training. The test set was used to report model performance after the model was chosen and trained. The remaining 80% (2901 observations) were used for training and validating.  
\begin{table}
\begin{tabular}{c c c c c c} \hline  & **Region** & **Area (km2)** & **CMLs Amount** & **CMLs Density (1/km2)** & **CMLs Mean Length (km)** \\ \hline - & All of Israel & 22,770 & 3624 & 0.16 & 3.54 \\ \hline \multirow{3}{*}{Urban} & Tel-Aviv & 85.18 & 264 & 3.1 & 1.48 \\  & Jerusalem & 44.16 & 141 & 3.2 & 1.26 \\  & Haifa & 56.14 & 159 & 2.8 & 1.58 \\ \hline \multirow{3}{*}{Sub-urban} & Hasharon & 235.54 & 124 & 0.53 & 2.5 \\  & Caesarean Area & 149.27 & 77 & 0.52 & 2.3 \\  & Nazareth Area & 182.78 & 89 & 0.49 & 2.4 \\ \hline \multirow{3}{*}{Rural} & Top North & 2718.74 & 278 & 0.1 & 4.7 \\  & Israel & 1474.73 & 69 & 0.05 & 8.07 \\ \hline \end{tabular}
\end{table}
Table 2: Empirical CML distributions based on environment type. Sub-regions are described in the appendix. Note that region “Tel Aviv”, for instance, does not apply solely to the city of Tel Aviv but to a more general region [13].  
Figure 5: The empirical relationship between a CML’s density and mean length in a given region. The black curve was derived through non-linear regression [13].  
We conducted model selection for a variety of parametric formulas. We constrained the pool of models to those having up to two parameters. The motivation for this constraint was to present a simple model.  
The following models were examined:  
\[\hat{d}_{1}(l)=\frac{a_{1}}{l},\hat{d}_{2}(l)=\frac{a_{1}}{l^{a_{2}}},\hat{d}_{3 }(l)=\frac{1}{a_{1}(l-a_{2})},\hat{d}_{4}(l)=\frac{1}{l^{a_{1}}-a_{2}}. \tag{2}\]  
Here \(\hat{d}\) is the estimator of \(d\), being the CMLs\({}^{\prime}\) density (CMLs/km\({}^{2}\)), and it is noted as an explicit function of \(l\), the CML's mean length (km). \(a_{1}\) and \(a_{2}\) are constant coefficients to be optimized via non-linear regression. They are chosen to be those that minimize the mean squared error (MSE). For example, this is the optimization process for the third model:  
\[\min_{a_{1},a_{2}}\{\text{MSE}\}=\min_{a_{1},a_{2}}\Bigg{\{}\frac{1}{l}\sum_{i= 1}^{I}\left(d[i]-\frac{1}{a_{1}(l[i]-a_{2})}\right)^{2}\Bigg{\}}. \tag{3}\]  
Here, \(I\) is the number of train observations.  
We performed a 5-fold cross validation for the training of every model out of the four. The MSE of the five validation iterations was calculated for each model by averaging the five MSEs. The best model was found to be the third model, achieving the lowest averaged validation MSE:  
\[\hat{d}(l)=\frac{1}{a_{1}(l-a_{2})}. \tag{4}\]  
The coefficients were derived to be (rounded to two decimal places), \(a_{1}=3,\ a_{2}=1.14\), yielding an averaged validation MSE = 0.221, and a test MSE = 0.229.  
\[\hat{d}(l)=\frac{1}{3(l-1.14)}\ \Leftrightarrow\ \hat{l}(d)=\frac{1+3.42d}{3d} \tag{5}\]  
The regressed model is plotted in Figure 5 in black.