## 4 Empirical Assessment Using Real-World Data
### Experimental Design
#### 4.2.2 Regression Stage  
In the regression stage of our analysis for crash frequency data on Korean roads, we adapted the CatBoost algorithm to function as a regressor. While CatBoost is typically used for classification tasks, it also performs well in regression, particularly when dealing with count data like crash frequencies. As explained earlier, the CatBoost Regressor with a Poisson loss function is specifically tailored for count data, which inherently follow a Poisson distribution. The Poisson loss, also known as log-likelihood for Poisson regression, is suitable for modeling the number of events occurring within a fixed interval, given that these events happen at a constant rate and independently of the time since the last event. For comparison, we also deployed the CatBoost Regressor utilizing its default loss function that employs MSE. This approach served as a benchmark to evaluate the efficacy of employing the Poisson loss function for our specific dataset. The default loss function is generally designed to handle various types of regression tasks, including those where the \begin{table}
\begin{tabular}{c c c} \hline \hline  & \multicolumn{2}{c}{**Actual Values**} \\ \cline{2-3}
**Predicted Value** & **Positive** & **Negative** \\ \hline
**Positive** & True positives (TP) & False positives (FP) \\
**Negative** & False negatives (FN) & True negatives (TN) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Confusion matrix. target variable is continuous. By comparing the performance of the CatBoost Regressor with Poisson loss to that with the default loss, we aimed to demonstrate the advantages of customizing the loss function to fit the nature of our data, specifically addressing the crash count data. Also, similar to the classification stage, the performance was compared against benchmark models. The zero-truncated Poisson (ZTP) model is particularly suited for count data that do not include the zero-count category, which is a common scenario in crash data analysis when considering only segments where crashes have occurred. The probability mass function (PMF) is adjusted to account for the absence of zero counts, effectively shifting the distribution to start from one instead of zero. The PMF of a standard Poisson distribution is given as follows:  
\[\mathrm{P}(\mathrm{Y}=y)=\frac{e^{-\lambda}\lambda^{y}}{y!} \tag{24}\]  
where \(\lambda\) is the rate parameter (mean number of occurrences in an interval), and \(y\) is the count of occurrences with \(y=0,1,2,\ldots\)  
For the ZTP model, the PMF becomes  
\[\mathrm{P}(Y=y|Y>0)=\frac{P(Y=y)}{1-P(Y=0)}=\frac{\frac{e^{-\lambda}\lambda^{y }}{y!}}{1-e^{-\lambda}}\quad for\ y=1,2,3,\ldots \tag{25}\]  
This adjusted PMF ensures that the probability of zero count is excluded from the model. The denominator, \(1-e^{-\lambda}\), serves to normalize the probabilities so that they sum to 1 over the domain \(y=1,2,3,\ldots\), effectively removing the probability mass that would have been at zero in a non-truncated Poisson distribution. The zero-truncated negative binomial (ZTNB) model is an extension of the negative binomial (NB) distribution that is used for count data with overdispersion, where the variance exceeds the mean and where the count of zero is not observed or is excluded. In a negative binomial (NB) distribution, the probability of observing \(y\) events is given as follows:  
\[\mathrm{P}(\mathrm{Y}=y)=\frac{\Gamma(y+k)}{\Gamma(\mathrm{k})y!}\left(\frac{ \lambda}{\lambda+k}\right)^{y}\left(\frac{k}{\lambda+k}\right)^{k} \tag{26}\]  
where \(\Gamma\) is the gamma function, \(y\) is the number of occurrences, \(\lambda\) is the mean number of occurrences, and \(k\) is the dispersion parameter.