# A Data-Driven Deep Learning Framework for Prediction of Traffic Crashes at Road Intersections
## 5 Performance Evaluation
### Parameter Analysis  
In Phase I of _RoadInTCP_, we employ a joint representation learning model for intersections and road segments in a network-based road network, namely RN2 Vec, which we proposed in [30]. RN2 Vec takes into account the topological structure of the intersections, as well as the impact of one-way road segments and the number of traffic lanes to learn the topological relationship features of intersections. To finetune the RN2 Vec model, we vary the values of important parameters to observe how the F1-score changes in traffic signal classification and avenue classification. The experiments test various parameters including dimensionality, the number of negative samples per positive sample, the number of shortest paths per node, the distance of window size, and parameter weights. Due to the absence of the New York City trajectory dataset, only the shortest path sampling method is employed for data sampling in RN2 Vec.  
The results of parameter analysis for traffic signal classification and avenue classification are shown in Figure 8 and Figure 9, respectively. In traffic signal classification, we set the dimensionality of intersection embeddings \(d=512\), negative (vs. positive) sampling rate \(ns=7\), the number of shortest paths per node \(wn=1280\), the distance of window size \(ws=900\) m; the weight parameters the objective function \(\alpha\) and \(\beta\) are set to 0.8 and 0.1. In avenue classification, we set the dimensionality of road segment embeddings \(d=1024\), negative (vs. positive) sampling rate \(ns=9\), the number of shortest paths per node \(wn=1280\), and the distance of window size \(ws=1300\) m. To sum up, for the RN2 Vec model, we set the dimensionality of all embeddings \(d=1024\), negative sampling rate \(ns=9\), the number of shortest paths per node \(wn=1280\), the distance of window size \(ws=100\) m, the weight parameters and the objective function \(\alpha\), \(\beta\), \(\gamma\), \(\omega\), \(\lambda\) and \(\mu\) are set to 0.8, 0.1, 0.8, 0.75, 0.6, 0.2, and the learning rate = 0.025 in all representation learning models.  
In Phase II of _RoadInTCP_, the inputs consist of topological feature relationships at intersections and additional contextual information. This supplementary context includes traffic situation, weather, environmental and calendar features pertinent to the intersections. Owing to the heterogeneity of multi-source data, this work normalizes all required feature information and applies aggregation functions (i.e., _Concatenation_, _Minus_, _Average_ and _Hadamard_) to represent the resultant latent vectors. More precisely, _Concatenation_ function directly joins normalized feature sets from various categories, the _Minus_ function yields the difference between vectors in the implicit space, and the _Average_ function computes the centroid of corresponding vectors in the implicit space; the _Hadamard_ function per  
Figure 8: Parameter analysis for RoadInTCP model in Phase I of traffic signal classification.  
forms element-wise multiplication. Empirical comparisons on the first half of the 2016 New York City traffic dataset reveal _F1-score_ performances as follows: 0.8493 with _Concatenation_ function, 0.8107 with _Minus_ function, 0.8234 with _Average_ function and 0.8241 with _Hadamard_ function. These results indicate that the _Concatenation_ function shows the best performance, preserving the raw information of each feature category. The _Hadamard_, _Average_ and _Minus_ functions all entail certain losses during computation, thereby justifying the use of concatenation for processing latent vectors within the RoadInTCP framework. Furthermore, In Phase II of _RoadInTCP_, we use a two-layer Graph Convolutional Network (GCN) architecture followed by a single fully connected layer and employ a two-layer Long Short-Term Memory (LSTM) network with a dimensionality of 256 in Phase III.