# Novel Semantic-Based Probabilistic Context Aware Approach for Situations Enrichment and Adaptation
## 5 The Prototype
### Evaluation and Comparison
#### 5.3.3 Tests and Configuration Setup  
We performed the following five tests:  
* **Test # 1: Rules items recommendation based on explicit preference context** We have applied the explicit preference context approach in order to extract the EP vector according to set of fields: application's fields (\"_security_\", \"_domotics_\", \"_health_\", \"_study_\", \"_work_\", \"_driving_\" and \"_shopping_\"), user's domain (\"home\", \"office\", \"university\" and \"outdoors\"), day (\"weekday\" and \"weekend\") and time (\"morning\", \"evening\" and \"night\"). First, the system computes the weights for explicit preferences of a user according to Equation (1) for a profile configuration. Table 5 illustrates explicit weights for three profiles configurations.  
* **Test # 2: Rules items recommendation based on hybrid preference-based approach** We applied both implicit and explicit preference approach to evaluate rule item according to current context of user. Hybrid preference-based recommendation compares location, day and time in a situation rule item with terms that define user preference to determine whether user likes that rule item.
* **Test # 3: Rules items recommendation based on implicit preference context** We apply the content-based approach to extract the implicit preference vector according to the user's agenda history. This experiment allows us to compute the weights for implicit preferences of user according to Algorithm 2, and recommends relevant situation rules against the current user's context based on the rule item terms weights and rules items history (see Figure 13).
* **Test #4: Rules items recommendation based on situation context Bayesian-based approach** Based on the Bayesian approach, we generate \(6\times 4\times 2\times 3\) = 120 classes, and each class is represented by a set of weight vectors. Then, we use the situation context Bayesian-based approach to evaluate the probability of the rule item belonging to the situation context.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Configurations** & **Smart Domain** & **Fields** & **Day** & **Time** \\ \hline \multirow{3}{*}{Configuration\#1} & \multirow{3}{*}{Home} & Study: 0.33 & \multirow{3}{*}{Weekday: 0.33} \\  & & Domotics: 0.33 & \multirow{3}{*}{Weekend: 0.67} \\  & & Security: 0.33 & & \\ \hline \multirow{3}{*}{Configuration\#2} & \multirow{3}{*}{Outdoors} & Driving: 0.5 & \multirow{3}{*}{Weekday: 1} \\  & & Shopping: 0.5 & & \\ \hline \multirow{3}{*}{Configuration\#3} & \multirow{3}{*}{Office} & Work: 0.5 & \multirow{3}{*}{Weekday: 1} \\  & & Security: 0.5 & & \\ \hline \hline \end{tabular}
\end{table}
Table 5: Explicit weights for three profiles configurations.  
* **Test # 5: Rules items recommendation based on the proposed approach**  
In this test, we apply the context-aware semantic probabilistic approach to evaluate rule items according to users' preferences, user's situations and device capability.  
The performance measures of the proposed approach are evaluated and compared using three criteria: user's preferences, rule item content and context situation. The effectiveness of the semantic-based probabilistic context-aware approach was compared with some well-known classifiers (Decision Tree (DT), Support Vector Machine (SVM) and Random Forest (RF)). Note that all experiments have been conducted on Java Eclipse on an Intel processor core i5-2430 2.4 GHz and 8 GB RAM. The experiment was conducted on multi-smart domains dataset. This dataset consists of 100 rules items, 76 belong to daily activities and 24 belong to health and security situations rules. We divide dataset into two parts: training and testing. The first one uses the training data set with a size of 80% and the second has a size of 20%. The detail of configurations and situations rules items sets are presented in Table 6.