# Detecting Traffic Incidents Using Persistence Diagrams
## 4 Results
### Data with Sensor Locations
The quality of the fit is given in Table 15. We only report the performance statistics for sensors \(S314402\) and \(S318593\) since those were the only sensors in the data set where incidents were labeled. \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 08:10 & 1 & 0.94792 & 1 \\
24-Jul-2017 12:12 & 0.66667 & 0.77083 & 0.875 \\
29-Mar-2017 08:25 & 1 & 1 & 1 \\
18-Jan-2017 14:23 & 0.95833 & 0.95833 & 0.79167 \\
15-Nov-2017 17:15 & 0.79167 & 0.83333 & 0.91667 \\
06-Apr-2017 20:34 & 0.875 & 1 & 0.95833 \\
16-Jun-2017 06:34 & 1 & 1 & 1 \\
27-Jan-2017 20:34 & 1 & 0.98387 & 0.91935 \\
07-Oct-2017 17:47 & 0.98387 & 0.79032 & 0.98387 \\ \hline \hline \end{tabular}
\end{table} 
Table 11: Percentiles of Phase 2-Train incidents when sorted by sensor, day of year, and time of day. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Incident Timestamp** & **Percentile by Adj Avg** & **Percentile by SD** & **Percentile by Adj Median** \\ \hline
06-Feb-2017 08:10 & 0.96454 & 0.83173 & 0.98307 \\
24-Jul-2017 12:12 & 0.96815 & 0.98518 & 0.77825 \\
29-Mar-2017 08:25 & 0.99319 & 0.98658 & 0.99800 \\
18-Jan-2017 14:23 & 0.83934 & 0.78846 & 0.87320 \\
15-Nov-2017 17:15 & 0.10497 & 0.9375 & 0.07692 \\
06-Apr-2017 20:34 & 0.86619 & 0.96955 & 0.97516 \\
16-Jun-2017 06:34 & 0.92575 & 0.94979 & 0.76549 \\
27-Jan-2017 20:34 & 0.90167 & 0.98263 & 0.47689 \\
07-Oct-2017 17:47 & 0.85019 & 0.97208 & 0.92067 \\ \hline \hline \end{tabular}
\end{table} 
Table 12: Percentiles of Phase 2-Train incidents when sorted by sensor, day of week, and time of day based on their adjacency statistics. As in Phase 1, we use the thresholds learned from the training data to classify the windows in the Phase 2-Test data. In this data set, there were 8 sensors. The 8 sensors formed 8 pairs of adjacent sensors, meaning we were able to compute adjacency scores for the windows on every sensor. In Table 16 we present the performance scores for this classification. The data for Phase 2-Test was very different from any of the other data sets. There were 1409 incidents with an average duration of 42 min. Surprisingly, no true incidents were reported at sensor \(S313386\). \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Sensor** & **Precision** & **Recall** & **F-Score** \\ \hline S314402 & 0.00185 & 0.67442 & 0.00369 \\ S318593 & 0.00153 & 0.49462 & 0.00305 \\ _Total_ & 0.00169 & 0.58101 & 0.00338 \\ \hline \hline \end{tabular}
\end{table} 
Table 15: The quality of fit for the Phase 2-Train data based on the thresholds determined by the labeled incidents. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Sensor** & **Precision** & **Recall** & **F-Score** \\ \hline S312564 & 0.01740 & 0.41598 & 0.03340 \\ S312566 & 0.02432 & 0.36706 & 0.04562 \\ S313386 & 0 & NA & NA \\ S313393 & 0.04704 & 0.44157 & 0.08502 \\ S313405 & 0.03479 & 0.42265 & 0.06429 \\ S313406 & 0.00024 & 0.46667 & 0.00048 \\ S318566 & 0.02870 & 0.45504 & 0.05400 \\ S318575 & 0.00748 & 0.33098 & 0.01462 \\ _Total_ & 0.01985 & 0.41685 & 0.03789 \\ \hline \hline \end{tabular}
\end{table} 
Table 16: The quality of fit for the Phase 2-Test data based on the thresholds determined by the Phase 2-Train incidents. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Sorted by:** & **Min Perc by Avg** & **Min Perc by SD** & **Min Perc by Median** \\ \hline sensor, day of week, time of day & 0.08974359 & 0.04026442 & 0.06971154 \\ sensor, day of year, time of day & 0.6129032 & 0.01041667 & 0.875\({}^{*}\) \\  & & Adjacency Thresholds & \\ sensor, day of week, time of day & 0.02483974 & 0.007612179 & 0.01682692 \\ sensor, day of year, time of day & 0.07291667 & 0.01041667 & 0.00677419 \\ \hline \hline \end{tabular}
\end{table} 
Table 14: Thresholds used for classifying windows by percentile scores in Phase 2. * indicates the largest threshold, \(\tau_{1}\).