# Detecting Traffic Incidents Using Persistence Diagrams
## 4 Results
### Data without Sensor Locations  
In the Phase 1-Train data set, we were able to find windows near the incidents that had very large average bottleneck distances. When sorted by sensor, day of week, and time of day, all of the 15 labeled incidents overlapped with a one-hour window starting within half an hour of some window that was ranked in the 85 th percentile. When sorting these sensors further by day of year, the start time of six of the incidents fell within half an hour of the window with the highest average bottleneck distance in their category. Tables 3 and 4 present the percentile scores of the incidents in the Phase 1-Train dataset. Table 5 contains the 6 thresholds determined using the rankings of windows near the labeled incidents. The quality of the fit is given in Table 6; as a comparison, the quality of fit using the standard normal derivates is given in Table 7. To better describe the quality of the anomaly scores, we provide the receiver operating characteristic (ROC) curve based on the three rankings in Figure 4. We also provide the ROC curve based on the standard normal deviates. Of course, these performance scores say very little about the method since the thresholds were determined using the incidents in the data set. Rather, we apply the thresholds in Table 5 to classify the Phase 1-Test data. Table 8 has the performance scores from this experiment, whereas Table 9 has the performance for the standard normal deviates on this dataset. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Incident Timestamp** & **Percentile by Avg** & **Percentile by SD** & **Percentile by Median** \\ \hline
06-Feb-2017 11:42 & 0.99199 & 0.99479 & 0.99359 \\
12-Jun-2017 16:47 & 0.91667 & 0.97276 & 0.82772 \\
26-Sep-2017 00:17 & 0.85626 & 0.72556 & 0.82285 \\
05-Sep-2017 01:45 & 0.85952 & 0.87190 & 0.66688 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Percentiles of incidents from the Phase1-Train data when sorted by sensor, day of week, and time of day. \begin{table}
\begin{tabular}{l c c c} \hline \hline
**Sensor** & **Precision** & **Recall** & **F-Score** \\ \hline S312425 & 0.00030 & 0.22857 & 0.00059 \\ S312520 & 0 & 0 & NaN \\ S312694 & 0.00074 & 1 & 0.00148 \\ S312942 & 0.00094 & 1 & 0.00187 \\ S314147 & 0.00264 & 0.75510 & 0.00526 \\ S315017 & 0.00173 & 0.79688 & 0.00348 \\ S315938 & 0.00146 & 0.72881 & 0.00291 \\ S317814 & 0.00109 & 1 & 0.00219 \\ S318180 & 0.00156 & 0.89130 & 0.00312 \\ S318566 & 0.00047 & 0.5 & 0.00093 \\ _Total_ & 0.00110 & 0.772390 & 0.00220 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Quality of fit for the Phase 1-Train data based on the thresholds determined by the labeled incidents using Algorithm 1. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Incident Timestamp** & **Percentile by Avg** & **Percentile by SD** & **Percentile by Median** \\ \hline
06-Feb-2017 11:42 & 0.875 & 0.89583 & 0.95833 \\
12-Jun-2017 16:47 & 1 & 1 & 0.91667 \\
26-Sep-2017 00:17 & 0.89831 & 0.72881 & 0.83051 \\
05-Sep-2017 01:45 & 0.86441 & 0.86441 & 0.64407 \\
30-May-2017 05:51 & 1 & 0.97222 & 0.94444 \\
18-Jul-2017 12:08 & 0.86458 & 0.91667 & 0.875 \\
05-Sep-2017 16:56 & 1 & 1 & 1 \\
26-Jul-2017 05:23 & 0.80556 & 0.80556 & 1 \\
22-Mar-2017 06:31 & 0.97222 & 1 & 1 \\
05-Apr-2017 10:45 & 0.97917 & 0.72917 & 0.94792 \\
12-Jan-2017 11:05 & 0.79167 & 0.82292 & 0.78125 \\
01-Dec-2017 08:30:00 & 1 & 1 & 0.95833 \\
05-May-2017 09:21 & 1 & 0.90625 & 1 \\
10-Feb-2017 12:44 & 1 & 1 & 1 \\
28-Oct-2017 16:14 & 0.5 & 0.5 & 0.83333 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Percentiles of incidents from the Phase 1-Train data when sorted by sensor, day of year, and time of day.