# Fine-Grained Mapping Between Daily Activity Features in Smart Homes
## 4 Results and Evaluation
### Experimental Setup  
We validate the proposed approach by evaluating the performance of DAR using the open-source tool Weka 3.8 [57]. For each pair of datasets collected from two different smart homes within the same group, one dataset is used as the training set and the other as the test set.  
Three sensor mapping approaches are compared in the evaluation: Approach C: Sensors are mapped if they have the same categories [49]. Approach CF: Sensors are mapped if they have the same categories and function areas [52; 53; 54]. Proposed Approach (PA): The proposed approach maps sensors based on the sensor event streams activated by daily activities. These sensor event streams serve as the feature space for daily activity recognition (DAR).  
For the DAR task, we employ three classifiers: Bayes Network (BN), Naive Bayes (NB), and Random Forest (RF), along with a Self-Organizing Map (SOM) for clustering. The evaluation metrics used are accuracy and precision, as defined in Equations (1) and (2), respectively. The following terms are used in these metrics:  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multicolumn{2}{c}{**Smart Homes**} & \multicolumn{8}{c}{**Activity Categories**} \\ \hline \multirow{3}{*}{HH101, HH105, HH110} & \multirow{3}{*}{\(1\)} & Bathe, Bed\_Toilet\_Transition, Cook\_Breakfast, Cook\_Dinner, Dress, Eat\_Breakfast, \\  & & Eat\_Dinner, Enter\_Home, Evening\_Meds, Groom, Leave\_Home, Morning\_Meds, \\  & & Personal\_Hygiene, Relax, Sleep, Sleep\_Out\_Of\_Bed, Toilet, Wash\_Breakfast\_Dishes, \\  & & Wash\_Dinner\_Dishes & \\ \hline \multirow{3}{*}{HH109, HH114, HH123} & Bathe, Bed\_Toilet\_Transition, Cook\_Breakfast, Cook\_Dinner, Cook\_Lunch, Dress, \\  & & Eat\_Breakfast, Eat\_Dinner, Eat\_Lunch, Enter\_Home, Entertain\_Guests, Evening\_Meds, \\ \cline{1-1}  & & Groom, Leave\_Home, Morning\_Meds, Personal\_Hygiene, Phone, Read, Relax, Sleep, \\ \cline{1-1}  & & Sleep\_Out\_Of\_Bed, Toilet, Wash\_Breakfast\_Dishes, Wash\_Dinner\_Dishes, Wash\_Dishes, \\ \cline{1-1}  & & Wash\_Lunch\_Dishes, Watch\_TV, Work\_At\_Table \\ \hline \hline \end{tabular}
\end{table}
Table 4: Shared activity categories.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  & **Kitchen** & **Dining** & **Parlor** & **Porch** & **Toilet** & **Bedroom** \\ \hline HH101, & & & & & & & \\ HH105, & & 1 & 1 & 1 & 1 & 1 & 1 \\ HH110 & & & & & & & \\ HH114, & & 1 & 0 & 1 & 1 & 1 & 1 \\ HH123 & & & & & & & \\ \hline \hline \end{tabular}
\end{table}
Table 2: Layouts related to six smart homes.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  & **D** & **LS** & **M** & **MA** & **BATP** & **BATV** & **T** & **L** \\ \hline HH101 & 3 & 16 & 12 & 4 & 18 & 18 & 5 & 0 \\ \hline HH105 & 5 & 18 & 13 & 5 & 23 & 23 & 5 & 6 \\ \hline HH110 & 5 & 15 & 11 & 4 & 19 & 19 & 4 & 6 \\ \hline HH109 & 7 & 17 & 14 & 3 & 20 & 20 & 4 & 2 \\ \hline HH114 & 3 & 13 & 4 & 9 & 16 & 16 & 3 & 8 \\ \hline HH123 & 1 & 14 & 5 & 9 & 6 & 17 & 6 & 0 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Number of equipped sensors in six smart homes grouped by category of sensors.  
* TP: The number of true positives, i.e., correctly classified instances using the proposed approach.
* FP: The number of false positives, i.e., incorrectly classified instances using the proposed approach.
* TN: The number of true negatives, i.e., correctly classified negative instances using the proposed approach.
* FN: The number of false negatives, i.e., incorrectly classified negative instances using the proposed approach.  
\[\text{Accuracy}=\text{TP}+\text{TN}/(\text{TP}+\text{TN}+\text{FP}+\text{ FN}) \tag{1}\]  
\[\text{Precision}=\text{TP}/(\text{TP}+\text{FP}) \tag{2}\]