# Automatic Ontology-Based Model Evolution for Learning Changes in Dynamic Environments
## 4 Proof of Concept and Case Study
### Case Study  
A case study was conducted to show how the proof of concept behaved in a realistic setting. This case study considered two scenarios. The first scenario covered moving from an ordinary apartment to a smart apartment, and the second covered moving from a smart apartment to a smart home. * Scenario 1: Moving from an ordinary apartment to a smart apartment. In this scenario, the user lives in an ordinary apartment during the years of study (\(t_{0}\)). The surrounding environment in which he or she lives contained only sensors commonly found in his or her smartphones, as shown in Figure 4(a). Obviously, the user's initial ontologybased model \(t_{0}\) answered to his or her surrounding environment as depicted in Figure 6. Then, after he or she graduated from the university, the user decided to move to a smart apartment equipped with sensors. At \(t_{1}\), this new environment, described in Figure 5b, was visited by the user. As illustrated in Figure 5b, a range of sensors from magnetic to electric, flush, PIR, and pressure sensors were available in the new user's smart apartment. Consequently, the initial ontology-based model, previously presented in Figure 6, would answer to the new environment illustrated in Figure 5b. To provide a strong answer, the data source selection service applied the automated data source search engine to select the appropriate data source using Apache Lucene. Figure 7 shows that it adopted the Ordonez dataset [26] for the evolution of the user's model at \(t_{1}\). It contained 20,358 observations in CSV format conducted with 14 sensors. These sensors captured about 10 basic activities. The candidate dataset was accompanied by metadata, a sample fragment of which is depicted in Figure 8.  
Figure 5: User’s surrounding environments (**a**) at \(t_{0}\) and (**b**) at \(t_{1}\). Figure 6: An excerpt of the user’s initial ontology-based model at \(t_{0}\). Next, the second and third modules used the Ordonez dataset together with the set of background knowledge to learn and refine a local ontology model. The output of the third module was the refined local ontology, an excerpt of which is shown in Figure 9.  
Figure 8: A sample fragment of the Ordonez metadata. Figure 7: Candidate data source selection at \(t_{1}\), the Ordonez dataset. After the refinement, the last module updated the user's initial ontology-based model. As a result, at \(t_{1}\), an evolved ontology-based model was generated, an excerpt of which is depicted in Figure 10.  
In this scenario, the user lived in a smart apartment at \(t_{1}\). This apartment encompassed a set of sensors, which is represented in Figure 11a. Obviously, the user's initial ontology-based model answered to his or her surrounding environment as depicted in Figure 10. Then, after a period of time, the user moved out of his or her smart apartment and into  
Figure 10: Ontology-based model evolution at \(t_{1}\), showing an excerpt of the evolved ontology-based model at \(t_{1}\). Figure 8.0 Ontology-based model learning at \(t_{1}\), the refinement phase, showing an excerpt of the refined local ontology. an independent smart home with more advanced sensors. At \(t_{2}\), this new and different pervasive environment, described in Figure 11b, was visited by the user. As illustrated in Figure 11b, a range of sensors including distance, sonar, force, temperature, photocell, and contact to infrared (IR) were available in the user's new smart home. Consequently, the initial ontology-based model, previously presented in Figure 10, would answer to the new pervasive environment illustrated in Figure 11b. To provide a strong answer, the data source selection service applied the automated data source search engine to select the appropriate data source using Apache Lucene. Figure 12 shows that it adopted the ARAS dataset [27] for the evolution of the user's model at \(t_{2}\), since this dataset had a stronger tendency for having the same features of the new smart home.