# Modeling and Reasoning of Contexts in Smart Spaces Based on Stochastic Analysis of Sensor Data +
## 5 Experimental Validation  
Automation reduces time and effort for modeling the structures of a process and avoids potential errors when manually configuring a process. However, an automated process might downgrade performance due to the lack of an ability to catch and handle unexpected exceptions. The validation point for an automation-enabled approach is to consistently show results that are as good as those produced by non-automated approaches in various cases. Therefore, we performed experimental validation with case studies to show whether these contexts are reasoned by our approach without violation. In the experiment, we conducted a reasoning process for a day-long scenario and evaluated whether a set of appropriate contexts was sequentially recognized. The contexts located within the set are considered as a contextual schedule, notated by \(\mathbf{C_{S}}(\subseteq\mathbf{C_{G}})\). Thus, the validation aimed to analyze the \(\mathbf{C_{S}}\) and decide whether this is reasonable and feasible. For our validation, we defined two measurements: _Fidelity_ and _Feasibility_. _Fidelity_ is used to measure the degree of reasonability of a \(\mathbf{C_{S}}\), and _Feasibility_ is used to terminologically describe whether the \(\mathbf{C_{S}}\) is at all possible by _Fidelity_. In short, _Fidelity_ generates numeric measurements, and _Feasibility_ divides the range of _Fidelity_ to particular categories. The categories of _Fidelity_ will be introduced after explaining how to calculate _Fidelity_. If a \(\mathbf{C_{S}}\) has a high _Fidelity_, it could be said to happen with high probability and be categorized as \"good\" _Fidelity_. We verbally describe it as being feasible or possibly feasible. Our approach was validated by showing how many \(\mathbf{C_{S}}\) are feasible. For this goal, we conducted the following steps:  
1. Preparing datasets: we built context models and context graph \(\mathbf{C_{G}}\) by analyzing sensor datasets. In this step, we obtained datasets from real-world scenarios, which are used as training sensor datasets for forming \(\mathbf{C_{G}}\). Note that each sensor dataset is formed in a collection of state spaces, \(\hat{\mathbf{S}}\). Then, we prepared more datasets as testing sensor datasets, which were used in the Evaluation step. Each testing sensor dataset also follows a form of \(\hat{\mathbf{S}}\). 2. Testing an approach: we reasoned the testing sensor datasets and obtained context schedule \(\mathbf{C_{S}}\). Note that we had to test each dataset; thus, there were multiple \(\mathbf{C_{S}}\), which were used to calculate fidelity. 3. Evaluating context schedules: we evaluated whether each context schedule \(\mathbf{C_{S}}\) obtained in the testing step was feasible. In the evaluation, we analyzed that a \(\mathbf{C_{S}}\) could be found along with context graph \(\mathbf{C_{G}}\) built in the preparing step. If the \(\mathbf{C_{S}}\) could be located, we could validate that the reasoning process was flawless. If we failed to find it, we considered two reasons. First, the \(\mathbf{C_{S}}\) was not feasible, and this meant the reasoning process had flaws. Second, the \(\mathbf{C_{G}}\) was not accurately established, which inferred that the modeling process was errored. Next, we will explain the conditions for evaluation algorithms. First, the training sensor datasets were collected for 11 days in the Gator Tech Smart House (GTSH) [42]. The datasets captured the status of 19 sensors, which were deployed on 18 objects, while 8 activities were performed by 2 volunteer testers. The floor plan describes where the objects and sensors were placed, as shown in Figure 5. A daily living scenario in which 8 activities were performed was proposed in [43]. Next, we used the Persim 3D simulator [43], which generates the testing sensor datasets. Persim 3D simulates pre-defined context models and a context graph \(\mathbf{C_{G}}\) based on a context-driven approach, and then synthesizes different datasets.