# Inferring Urban Social Networks from Publicly Available Data
## 3 Impact of System Parameters
### Using Real Population Density and Distances  
One of the main elements of novelty of our model resides in the use of a data-driven population, in contrast with a body of research work on spatial networks that assumes a certain regularity in the spatial distribution of the population (e.g., uniform or Gaussian). The positioning of the individuals of the population and the level of penalization imposed to geographically long edges impact on the final shape of our social graph at multiple levels. To assess the relevance of using real data for the spatial density of the population, we study the friendship network \(G_{F}\) (i.e., no household edges, \(\
u=0\) and \(K=\mu\)) obtained with either a data-driven population or a homogeneous population where individuals are distributed uniformly at random in the given territory, but fixing in both cases the size of the groups to be uniform, i.e., \(|V_{t}|=\frac{N}{n}\) for all age groups. We consider three different options for \(D(u,v)\): \(D(u,v)=1\) for all \(u,v\), \(D(u,v)=d(u,v)^{-0.5}\) and \(D(u,v)=d(u,v)^{-2}\). Since one of the criteria for comparison will be the connectivity of the network, we let \(\mu\) vary as \(\mu=5\) or \(\mu=10\). Conversely, to isolate the dependency of the edge distribution upon the spatial density, we take both \(S\) and \(f_{u}\) to be constant and equal to \(1\). Table 5 and Figures 4-6 show the results of our tests for the city of Florence--for the other two cities, see Appendices C and D. We repeated the construction of the social graph 10 times for each configuration. Since the variance is negligible and adds no valuable element of discussion, for the sake of clarity, we only included in Table 5 the average value for each metrics over each set of runs. Figures 4 and 5 instead report the mean distributions over each set of runs with a 95% confidence interval. To measure the distance between the data distributions and the Poisson distribution, we compute the relative entropy or Kullback-Leibler (KL) distance; the values are reported in the caption of the figures. The KL distance \(D(p||q)\) between distribution \(p\) and \(q\) measures the amount of information lost when the distribution \(q\) is used to approximate the distribution \(p\)[74]. \begin{table}
\begin{tabular}{l c c c c c c} \hline \multicolumn{7}{c}{**(a) Friendship Network for \(\mu=5\). Expected Values for an ER Graph with \(\mu=5\): \(\langle\text{dist}\rangle\approx 7.95\), \(C=1.38\)e-05.**} \\ \hline \multicolumn{7}{c}{\(\mu=5\)} \\
**Population** & \(D(u,v)\) & \(\langle\text{dist}\rangle\) & \(C\) & \(\rho\) & \# Comp. & **Giant \%** \\ \hline homogeneous & \(1\) & 8.13 & 1.5e-05 & 2.5e-04 & 2497.5 & 99.3\% \\ homogeneous & \(d(u,v)^{-0.5}\) & 8.11 & 1.4e-05 & 0.0018 & 2660.4 & 99.3\% \\ homogeneous & \(d(u,v)^{-2}\) & 8.08 & 7.2e-05 & 0.05 & 3385.9 & 99.0\% \\ real & \(1\) & 8.13 & 1.3e-05 & \(-3.8\)e-04 & 2504.3 & 99.3\% \\ real & \(d(u,v)^{-0.5}\) & 8.09 & 1.3e-05 & 0.0044 & 2914.1 & 99.2\% \\ real & \(d(u,v)^{-2}\) & 7.83 & 5.6e-05 & 0.12 & 12443.8 & 96.3\% \\ \hline \multicolumn{7}{c}{**(b) Friendship Network for \(\mu=10\). Expected Values for an ER Graph with \(\mu=10\): \(\langle\text{dist}\rangle\approx 5.56\), \(C=2.75\)e-05.**} \\ \hline \multicolumn{7}{c}{\(\mu=10\)} \\
**Population** & \(D(u,v)\) & \(\langle\text{dist}\rangle\) & \(C\) & \(\rho\) & \# Comp. & **Giant \%** \\ \hline homogeneous & \(1\) & 5.81 & 2.7e-05 & 2.9e-04 & 17.6 & 100.0\% \\ homogeneous & \(d(u,v)^{-0.5}\) & 5.80 & 2.8e-05 & 0.0042 & 23.5 & 100.0\% \\ homogeneous & \(d(u,v)^{-2}\) & 5.84 & 1.5e-04 & 0.09 & 53.7 & 100.0\% \\ real & \(1\) & 5.81 & 2.8e-05 & 1.7e-04 & 16.1 & 100.0\% \\ real & \(d(u,v)^{-0.5}\) & 5.80 & 2.9e-05 & 0.0088 & 32.5 & 100.0\% \\ real & \(d(u,v)^{-2}\) & 5.79 & 1.1e-04 & 0.2 & 2317.6 & 99.3\% \\ \hline \end{tabular}
\end{table} 
Table 5: **(Florence) Main features of the friendship graph \(G_{F}\) as the population type, \(D(u,v)\) and \(\mu\) vary, for constant \(f_{u}\) and \(S\).