# Detecting Urban Mobility Structure and Learning Functional Distribution with Multi-Scale Features
## 4 Case Study
### Urban Functional Distribution Learning  
Based on the urban area embedding vectors obtained from the urban mobility structure, we conducted urban functional distribution learning and constructed a nonlinear mapping relationship between crowd activities and urban functions. We used three metrics, namely KL divergence (\(d_{KL}\)), cosine similarity (\(d_{cos}\)), and L1 distance (\(d_{L1}\)), to comprehensively evaluate the quality of the upstream urban region embedding vectors and the performance of the downstream functional distribution learning. The calculation principles of KL divergence, cosine similarity, and L1 distance are as follows:  
\[d_{KL}\ =\ \widehat{y}_{i}\text{log}(\frac{\widehat{y}_{i}}{y_{i}}) \tag{15}\]  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Methods** & **Work** & **Rest** \\ \hline Louvain & 0.109 & 0.085 \\ GCL & 0.378 & 0.350 \\ ours & 0.503 & 0.392 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Edge density.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Period** & **Type I** & **Type II** & **Type III** & **Type IV** & **Type V** \\ \hline weekdays & 105 & 228 & 52 & 87 & 31 \\ weekends & 64 & 233 & 59 & 99 & 48 \\ \hline \hline \end{tabular}
\end{table}
Table 3: The number of regions in each community.  
\[d_{cos}\;=\;\frac{\widehat{y_{i}}\cdot y_{i}}{\|\widehat{y_{i}}\|\cdot\|y_{j}\|} \tag{16}\]  
\[d_{L1}\;=\;|\widehat{y_{i}}-y_{i}| \tag{17}\]  
where \(y_{i}\) is the actual regional label distribution and \(\widehat{y_{i}}\) is the predicted regional label distribution.  
GCN and GCL are the selected baseline models: GCN takes the mobility network as input, aggregates information from neighboring nodes using graph convolution, and combines it with downstream models for regional functional distribution learning. GCL uses embedding vectors derived from the urban mobility structure partitioning, and then combines them with downstream models for functional distribution learning.  
Table 5 shows the performance of the baseline methods, the proposed method for functional distribution learning. The KL divergence of the proposed method is 0.021, the cosine similarity is 0.858, and the L1 distance is 55.8, achieving the best results across all metrics. This indicates that the learned distribution is very close to the real situation of the regions. GCL only considers the local information of nodes during urban mobility structure partitioning, ignoring global activity structure features, leading to lower accuracy compared to the proposed method. In the case of GCN, the parameters of the upstream embedding model are also involved in training during functional distribution learning, resulting in better performance than GCL. However, since it does not learn global activity structure features, its accuracy is still lower than that of the proposed method. This suggests that the global activity structure features, which reflect the overall crowd activity situation, are strongly correlated with urban functions and play an important role in functional distribution learning.  
Further comparison of the combinations of all embedding models and downstream models reveals that, regardless of the embedding model used, the method proposed in this paper significantly improves accuracy compared to MLP. MLP consists of three fully connected layers, while the proposed method innovatively introduces a correlation matrix based on MLP. This matrix can accurately encode the correlations between different urban functions, enabling the model to achieve stronger accuracy performance. This further highlights the advantages of the proposed method in urban functional distribution learning tasks.