## 2 Methods for Evaluating Driving Risk
### Weight Derivation for Evaluation Items
\[\mathbf{A}= \begin{pmatrix}\frac{A_{11}}{\sum_{i=1}^{n}A_{i1}}&\frac{A_{12}}{\sum_{i =1}^{n}A_{i2}}&\cdots&\frac{A_{1n}}{\sum_{i=1}^{n}A_{i2}}\\ \frac{A_{21}}{\sum_{i=1}^{n}A_{i1}}&\frac{A_{22}}{\sum_{i=1}^{n}A_{i2}}&\cdots &\frac{A_{2n}}{\sum_{i=1}^{n}A_{i2}}\\ \vdots&\vdots&\ddots&\vdots\\ \frac{A_{11}}{\sum_{i=1}^{n}A_{i1}}&\frac{A_{22}}{\sum_{i=1}^{n}A_{i2}}&\cdots &\frac{A_{2n}}{\sum_{i=1}^{n}A_{i2}}\end{pmatrix}  \tag{2}\]  
Figure 1: Hierarchy framework for two-wheeled vehicle driving evaluation. Figure 2: Example of pairwise comparison survey for categories. \[\mathbf{W}=\left[\frac{\sum_{i=1}^{n}\mathbf{A}_{ii}}{n}\quad\frac{\sum_{i=1}^{n}\mathbf{A}_{2i} }{n}\quad\ldots\quad\frac{\sum_{i=1}^{n}\mathbf{A}_{ni}}{n}\ \right]^{T} \tag{3}\]  
Through consistency ratio, the logical consistency of each respondent's response result is verified. First, the matrix \(\mathbf{AW}\) is derived by multiplying the comparison matrix \(\mathbf{A}\) by the weight matrix \(\mathbf{W}\). Then, the vector \(\lambda\) is obtained by dividing the elements of \(\mathbf{AW}\) by the corresponding elements of \(\mathbf{W}\). \(\lambda_{max}\) is calculated by averaging \(\lambda\). The consistency index (CI) is derived by Equation (4). The consistency ratio (CR) is the ratio of CI and the corresponding random index (RI), which is equal to Equation (5). When \(CR>0.1\), it is judged as a consistent response. In this study, the consistency ratio is calculated through a web-based survey form, allowing respondents to review the response values if they are greater than 0.1 and revise their response instantly. \[\text{CI}=\frac{\lambda_{max}-n}{n-1} \tag{4}\]  
\[CR=\frac{CI}{RI} \tag{5}\]  
After the above process is repeated for each criterion of each respondent, a comparison matrix is aggregated using the geometric mean for all respondents. Then, the consistency of the aggregated matrix is checked, and the local weight matrix of the evaluation items is multiplied by the category weight to calculate the global weight for each evaluation item. In this process, the number of evaluation items for each category is not the same: traffic violation--5 items, pedestrian threat--2 items, and reckless driving--4 items. If the number of each sub criterion belonging to each main criterion is different, a serious error occurs in the AHP analysis, so a process for adjusting this is necessary [45]. Therefore, as in Equation (6), the revised weight \(\mathbf{RW}_{ij}\) of evaluation item \(j\) belonging to category \(i\) is calculated. \[\mathbf{RW}_{ij}=\frac{\mathbf{W}_{i}\times\mathbf{W}_{ij}\times n_{i}}{\sum_{i=1}^{n} \sum_{j=1}^{m}\left(\mathbf{W}_{i}\times\mathbf{W}_{ij}\times n_{i}\right)} \tag{6}\]  
where \(\mathbf{W}_{i}\) denotes the weight of category \(i\), \(\mathbf{W}_{ij}\) denotes the weight of evaluation item \(j\) belonging to category \(i\), and \(n_{i}\) denotes the number of evaluation items belonging to category \(i\). In the case of evaluation items belonging to the reckless driving category, which are rapid acceleration, rapid deceleration, rapid turn, and rapid lane change, the risk criteria are not defined, and evaluation according to the degree is necessary. In addition, it is difficult to establish such risk criteria by verbal expression. However, it is impractical to obtain driving data by requiring such reckless behavior during real-world driving. Therefore, using Carla (version 0.9.13), which is a high-performance driving simulator [46], videos were implemented with different degrees of speeds, accelerations, and angular velocities. Then, risk scores from 1 to 5 were collected through survey responses for each video. Based on the response results for each video type, the risk criteria for each item were statistically calculated. These risk criteria are used to determine the weight for each type.