# Clustering on the Chicago Array of Things: Spotting Anomalies in the Internet of Things Records
## 4 Results
\begin{table}
\begin{tabular}{c c c c} \hline
**Node** & **Sensor** & **Clusters** & **Heuristic Anomalies** \\ \hline
001e0610f02f & bmp180 & 0: 538,608, 1: 302,412 & 302,412 \\
001e0610f02f & htu21d & 0: 538,656, 1: 302,364 & 302,364 \\
001e0610f02f & pr103j2 & 1: 869,380, 0: 16 & 91 \\
001e0610f02f & tmp112 & 0: 515,424, 1: 325,022 & 325,022 \\
001e0610f02f & tsys01 & 0: 538,615, 1: 302,405 & 302,405 \\ \hline
001e06113d20 & bmp180 & 0: 988,385, 1: 146,584 & 146,584 \\
001e06113d20 & htu21d & 1: 988,382, 0: 146,585 & 146,585 \\
001e06113d20 & pr103j2 & 0: 725,652, 1: 410,257 & 0 \\
001e06113d20 & tmp112 & 0: 911,575, 1: 185,959 & 185,959 \\
001e06113d20 & tsys01 & 0: 988,298, 1: 146,672 & 146,672 \\ \hline
001e0610 ba3b & bmp180 & 0: 140,726 & 0 \\
001e0610 ba3b & htu21d & 0: 139,592 & 57 \\
001e0610 ba3b & pr103j2 & 1: 275,070, 0: 88,321 & 0 \\
001e0610 ba3b & tps012 & 0: 140,951 & 14 \\
001e06113f54 & & & \\ \hline bmp180 & 0: 876,475, 5: 30,274, \(-1\): 22 & 13 & 30,275 \\ htu21d & 4076: 30,270, 502: 618, \(-1\): 393 & 4079 & 30,270 \\ pr103j2 & 0: 906,874, \(-1\): 38 & 5 & 59 \\ tmp112 & 721: 30,270, 173: 3537, \(-1\): 23 & 732 & 89,119 \\ tsys01 & 49,675: 30,269, \(-1\): 173,060 & 49,681 & 30,269 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: K-Means cluster counts vs. heuristically determined anomalies for each sensor. Interestingly, despite the algorithm chosen, node ba3b routinely clusters with one cluster (often confusing both DBSCAN variants into believing all the data are noise). This is interesting, considering that the small bounds for the hyper-parameters for DBSCAN and H-DBSCAN tend to produce many clusters. As mentioned, H-DBSCAN failed to cluster the tsys01 sensor due to library execution issues; therefore, that information is missing. Overall, all three algorithms perform well in clustering together the heuristically determined anomalies, with K-Means successfully clustering heuristic anomalies separately 11/17 times (64.71% success), DBSCAN having 10 matching or near-matching heuristic anomaly counts and 7 misses (58.82% success), and H-DBSCAN having 7 matching or near-matching heuristic anomaly counts and 6 misses (53.85% success). Most of the misses for each algorithm (five for K-Means and DBSCAN, and four for H-DBSCAN) occurred when very few heuristic anomalies were present in the data. Given that DBSCAN and H-DBSCAN provide a method to treat small numbers of points as noise, it is not surprising that the algorithms do not properly cluster the heuristic anomalies separately in these cases. By definition of being restricted to only two clusters, K-Means would also find it difficult to cluster such a small number of points in a separate cluster. Again, we specify that no algorithm had access to the ground-truth data or the heuristic labels; all analysis was performed after the runs were complete. In addition to the analysis against the ground-truth data, we calculated the Davies-Bouldin (DB) score for each node and sensor against each clustering algorithm. In addition, any instance where only one cluster was present has no score since the DB score requires at least two clusters to compare against. The results are seen in Tables 6-8.