## 2 Materials and Methods
### Random Forest
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Variable Type** & **Variable** & **Description** & **Description** & **Proportion (\%)** \\ \hline \multirow{2}{*}{Rush Hour or not} & \multirow{2}{*}{Whether the accident occurred during rush hour. (Peak hours are set from 7:00-9:00; 17:00-19:00)} & 0 = No & 39.4\% \\  & & & 1 = Yes & 60.6\% \\ \hline \multirow{2}{*}{Night Time or not} & \multirow{2}{*}{Whether the accident occurred at night.} & 0 = No & 65.3\% \\  & & (Peak hours are set from 7:00-9:00; 17:00-19:00) & 1 = Yes & 34.7\% \\ \hline \multirow{2}{*}{Night Time or not} & \multirow{2}{*}{Whether the accident occurred at night.} & 0 = No & 80.1\% \\  & & 1 = Yes & 19.9\% \\ \hline \multirow{2}{*}{Extreme Temperatures} & \multirow{2}{*}{Whether the temperature is higher than 30 °C or lower than 0 °C on the day of the accident} & 0 = No (0–30 °C) & 78.2\% \\  & & 1 = Yes (e10 °C or 30 °C) & 24.4\% \\ \hline \multirow{4}{*}{Season} & \multirow{2}{*}{The season in which the accident occurred. (Due to the special geographical location of Shenyang, spring and autumn are shorter, while winter is longer)} & 0 = Spring (4–5) & 26.8\% \\  & & 1 = Summer (6-8) & 29.5\% \\  & & 1 = Summer (9–10) & 8.9\% \\  & & 3 = Winter (1–3:11–12) & 35.1\% \\ \hline \multirow{4}{*}{Environmental and Time Attributes} & \multirow{2}{*}{Weather} & 0 = Sunny & 90.8\% \\  & & 1 = Cloudy & 4.4\% \\  & & the time of a crash. & 2 = Rain & 4.1\% \\  & & 3 = Fog & 0.1\% \\  & & 4 = Snow & 0.6\% \\ \hline \multirow{2}{*}{Network Density} & \multirow{2}{*}{The density of road network in the buffer zone (km/km\({}^{2}\))} & 0 \(\leq\) 10 km/km\({}^{2}\) & 75.0\% \\  & & 1 = 10-20 km/km\({}^{2}\) & 23.9\% \\  & & 2 \(\geq\) 20 km/km\({}^{2}\) & 1.1\% \\ \hline \multirow{2}{*}{Shopping-POI} & \multirow{2}{*}{The density of restaurant and shopping centers in the buffer zone (pcs/km\({}^{2}\))} & 0 \(\leq\) 50 pcs/km\({}^{2}\) & 43.0\% \\  & & 1 = 50-500 pcs/km\({}^{2}\) & 41.9\% \\  & & 2 \(\geq\) 500 pcs/km\({}^{2}\) & 15.1\% \\ \hline \multirow{2}{*}{Education-POI} & \multirow{2}{*}{The density of scientific, educational and cultural facilities in the buffer zone (pcs/km\({}^{2}\))} & 0 \(\leq\) 50 pcs/km\({}^{2}\) & 80.2\% \\  & & 1 = 50-500 pcs/km\({}^{2}\) & 19.8\% \\  & & 2 \(\geq\) 500 pcs/km\({}^{2}\) & 0.0\% \\ \hline \multirow{2}{*}{Commercial-POI} & \multirow{2}{*}{The density of commercial and residential facilities the buffer zone (pcs/km\({}^{2}\))} & 0 \(\leq\) 50 pcs/km\({}^{2}\) & 97.2\% \\  & & 1 = 50-500 pcs/km\({}^{2}\) & 2.8\% \\  & & 2 \(\geq\) 500 pcs/km\({}^{2}\) & 0.0\% \\ \hline \multirow{2}{*}{Service-POI} & \multirow{2}{*}{The density of living service in the buffer zone (pcs/km\({}^{2}\))} & 0 \(\leq\) 50 pcs/km\({}^{2}\) & 57.5\% \\  & & 1 = 50-500 pcs/km\({}^{2}\) & 42.4\% \\ \cline{1-1}  & & 2 \(\geq\) 500 pcs/km\({}^{2}\) & 0.1\% \\ \hline \hline \end{tabular}
\end{table} 
Table 1: _Cont._2. max_depth: this parameter indicates the maximum tree depth. When the decision tree splits and reaches the depth set by this parameter, it will stop splitting, i.e., branches exceeding max_depth will be cut off;
3. max_features: this parameter reflects the number of features to be randomly selected by each base evaluator in the random forest when generating the tree, and its default value is the squared-off integer of the total number of features in the dataset;
4. min_samples_leaf: in the decision tree splitting process, if the number of samples in a child node generated by a node after splitting is less than this value, the node will not be split;
5. min_samples_split: if the number of samples in a node is less than this value, the node is a leaf node and will not be split. In the actual modeling process, the parameters do not need significant adjustments to achieve good classification prediction results. In this study, two main parameters affecting the tuning performance of random forest are selected, including the total number of decision trees (n_estimators) and the maximum tree depth (max_depth).