# CvAMoS--Event Abstraction Using Contextual Information
## 5 Evaluation
### Evaluation on a Real Dataset  
The evaluation on a real dataset compares the results of the two approaches \(\text{CvAMoS}\) and LPM. We select the CASAS dataset [23] for this task. The dataset contains sensor data collected in a smart apartment, where a single person is living. The log is labeled (i.e., high-level activities), but no information is given on how and when the activities are performed. Therefore, we decided to not consider the actual labeling and just use the real raw data for our experiment. We first selected 15 cases, composed of 95,000 events (generated starting from 39 sensors). As the resident did not have guidelines to follow, it cannot be assumed that the behaviors were recurrent. To be able to handle the dataset and to understand the daily behaviors, it was necessary to preprocess the dataset and reduce its size. The first filter applied aims to reduce the recording interval, keeping only events from 08:00 to 12:59. Then, sensor readings not necessary for the recognition of activities \begin{table}
\begin{tabular}{c c c c c c c c c c c c c c c c} \hline \hline  & **P1** & **P1**-Pn** & **P2** & **P2**-Pn** & **P3** & **P3**-Pn** & **P4** & **P5** & **P5**-Pn** & **P6** & **P7** & **P7**-Pn** & **P8** & **P8**-Pn** \\ \hline R4 & 1 & 0.5 & 0.5 & 0.5 & 1 & 0 & 0 & 0.5 & 0.5 & 0 & 1 & 1 & 1 & 0 & 0.526316 \\ R5 & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 & 0 & 0.5 & 0.5 & 0 & 0.5 & 0.5 & 0.5 & 0.5 & 0.5 & 0.461538 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: QR metrics for the two runs R4 and R5 on \(\text{CvAMoS}\). Figure 3: Computation time for R1, R2, and R3 (lower is better, logarithmic scale). Figure 2: Q1 and QR metrics for the three configurations (higher is better). (**a**) Q1 for the executions R1, R2, and R3. (**b**) Aggregated QR for R1, R2, and R3. (i.e., OFF values) were filtered out. The last step was to merge duplicate consequent events. The resulting log consists of 15 cases, 12,977 events, still with 39 sensors involved. The event log is used as input for the two abstraction algorithms. The key of CvAMoS is its ability to work with the context. Therefore, temperature sensors in the dataset are considered as contextual attributes and included in the attribute map. A tolerance value of 4, and the mean as an aggregation operator are set for all of the unique attribute identifiers. In the end, a total of 2151 events in the log are classified as contextual events. CvAMoS can be applied in an iterative way, meaning that for each run it returns a set of motifs, which can be filtered in the event log, and then the algorithm can be re-applied to identify further motifs. For each run, we defined a specific setting for the parameters. We started by searching motifs from a certain motif length and with low distances values, and then in subsequent iterations, when the algorithm could no longer identify verified motifs, we steadily increased the distances parameters and reduced the quorum. After each run, the returned set of verified motifs is analyzed and eventually separated into different files to be labeled in the log with different higher-level activity labels. To visualize the motifs, we used the Process Mining ToolKit [24], while the selection process was supported by the use of the floor-map of the environment. A list of verified motifs describing a behavior involving the same set of sensors placed close together in the environment was most likely labeled with the same activity label. An example is reported in Figure 4, where the algorithm returned four motifs that show a high level of similarity. The three sensors involved are placed in the same area in the environment, and their behavior describes the same sequence, thereby they can be interpreted as the same activity. A total of 61 patterns are identified after 27 iterations. The abstraction did not cover the entire event log, but it considerably reduced the number of events. Table 5 shows the results of the abstraction. In each row, the top bar depicts the events (and their duration) for the trace in the original event log.