## 7 Automated Event Visualization Using Semantic Reasoning
```
@prefixdash:c[[http://dynamicdashboard.ilabt.inec.be/broker/ontologies/dashboard#](http://dynamicdashboard.ilabt.inec.be/broker/ontologies/dashboard#)]([http://dynamicdashboard.ilabt.inec.be/broker/ontologies/dashboard#](http://dynamicdashboard.ilabt.inec.be/broker/ontologies/dashboard#))>. @ [] a dash:dataset@cubes <[[https://github.ilabt.inec.be/dversify/dversify-ml-anomally-detector/UBU/](https://github.ilabt.inec.be/dversify/dversify-ml-anomally-detector/UBU/)]([https://github.ilabt.inec.be/dversify/dversify-ml-anomally-detector/UBU/](https://github.ilabt.inec.be/dversify/dversify-ml-anomally-detector/UBU/)) -- HEALTHON3.170103050005.2/sensor.indoor.CO2.concentration%34%3 Number/1532217600000 : dash:visualization <http://localhost/sensor-gateway/things/visualizations/general-anomally-info> ; dash:objectName \"Unusual pattern detected.\". ```

**Listing 11**. Output of the anomaly visualization reasoning for an event detected by the Unknown Pattern Detector. Based on this output, a dashboard tab will be created for the investigation of the event, consisting of a widget displaying key event information and two widgets displaying historical sensor data for the CO\({}_{2}\) and absolute humidity sensor properties for which the unexpected time series was detected. ```
@prefixdash:c[[http://dynamicdashboard.ilabt.inec.be/broker/ontologies/dashboard#](http://dynamicdashboard.ilabt.inec.be/broker/ontologies/dashboard#)]([http://dynamicdashboard.ilabt.inec.be/broker/ontologies/dashboard#](http://dynamicdashboard.ilabt.inec.be/broker/ontologies/dashboard#))>. @ [] a dash:dataset@cubes <[[https://github.ilabt.inec.be/dversify-ml-anomally-detector/UBU/](https://github.ilabt.inec.be/dversify-ml-anomally-detector/UBU/)]([https://github.ilabt.inec.be/dversify-ml-anomally-detector/UBU/](https://github.ilabt.inec.be/dversify-ml-anomally-detector/UBU/)) -- HEALTHON3.170103050005.2/sensor.indoor.CO2.concentration%34%3 Number/1532217600000 : dash:visualization <http://localhost/sensor-gateway/things/visualizations/general-anomally-info> ; dash:objectName \"Unusual pattern detected.\". ```

**Listing 11**. Output of the anomaly visualization reasoning for an event detected by the Unknown Pattern Detector. Based on this output, a dashboard tab will be created for the investigation of the event, consisting of a widget displaying key event information and two widgets displaying historical sensor data for the CO\({}_{2}\) and absolute humidity sensor properties for which the unexpected time series was detected. ## 8 Capturing User Feedback

Through the dashboard user's analysis of visualized events, user feedback can be captured to assess the correctness of detected events. We implemented the following three actions for users to submit feedback (Figure 3 visualizes which interaction can be performed by the user):

* (Re)labeling event alerts: by clicking the pencil icon next to an alert (see Figure 3) the user can give the event a meaningful free-text description. Suggestions of similar descriptions pop up below the text box to avoid that many variations of the same description are entered in the system. As a result, the dashboard's back end system updates the event's folio:description and adds the types folio:RelabeledAnomaly and folio:ConfirmedAnomaly from the FOLIO ontology to the semantic description of the event (see Section 6). The former indicates the user has changed the event description, the latter indicates the user has acknowledged the event as a positive example of the event. Please note that the event description is always shown in the list of detected anomalies, just like the date of detection and the sensor on which the event was detected. * Merging event alerts, by selecting multiple alerts and then clicking the merge button (see Figure 3). This indicates that multiple detections (e.g., over different signals) actually belong to a single event. When doing so, a new event is created in the dashboard's back end system with the types folio:MergedAnomaly and folio:ConfirmedAnomaly.