# Joint Learning of Temporal Models to Handle Imbalanced Data for Human Activity Recognition
## 4 Experimental Setup and Evaluation
### Dataset of Smart Home Data  
Five human Activities of Daily Living (ADLs) recorded using binary sensors in real smart homes from public datasets are used for the evaluation. Among them, two datasets contain the sensor data from residents' daily routine, referred as to Ordonez Home A and B [47]. These two smart homes are typically equipped with different binary sensors that can capture the daily physical activities of the residents. The binary sensors in these datasets are passive infrared (PIR) motion detectors to detect physical activities and interactions in a limited area, pressure sensors on beds and couches in order to detect the user's presence, reed switches on cupboards and doors to measure open or close status, and float sensors in the bathroom to measure toilet being flushed or not. Table 1 provides details of the two Ordonez smart homes A and B with information of the inhabitants, and the number of activities and sensors. In Ordonez Home A, nine physical activities were carried out in fourteen days over a period of 20358 min, where data were recorded by twelve sensors in the home. In Ordonez Home B, ten physical activities were carried out in twenty-two days over a period of 30,469 min, where data were recorded by twelve binary sensors. The timeline of the physical human activities for all the smart homes data is segmented in time slots using the window size \(\Delta\)t = 1 mi. The activities of the common activities from Ordonez Homes A and B are _Breakfast, Lunch, Sleeping, Grooming, Leaving, Idle, Snack, Showering, Spare Time/TV, and Toileting_, respectively. In addition to these activities, Ordonez Home B has the activity _Dinner_. Table 2 shows the number of observations for each activity in the Ordonez datasets. Three datasets from [48,49] were collected from three other environments equipped with binary sensors as well, refer to as Kasteren home A, B, and C. The details of these datasets are shown in Table 1. In Kasteren home A, ten daily human activities were carried out in twenty-five days over a \begin{table}
\begin{tabular}{l c c c c c} \hline \hline  & **Ordonez-Home A** & **Ordonez-Home B** & **Kastem-Home A** & **Kastem-Home B** & **Kastem-Home C** \\ \hline Setting & Home & Home & Apartment & Apartment & House \\ Rooms & 4 & 5 & 3 & 2 & 6 \\ Duration & 14 days & 21 days & 25 days & 14 days & 19 days \\ Sensors & 12 & 12 & 14 & 23 & 21 \\ Activities & 10 & 11 & 10 & 13 & 16 \\ Age & - & - & 26 & 28 & 57 \\ Gender & - & - & Male & Male & Male \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Details of the datasets. \begin{table}
\begin{tabular}{l c c} \hline \hline  & **Active** & **Home A** & **Home B** \\ \hline Dinner & - & 120 \\ Snack & 6 & 408 \\ Showering & 96 & 75 \\ Grooming & 98 & 427 \\ Breakfast & 120 & 309 \\ Toileting & 138 & 167 \\ Lunch & 315 & 395 \\ Idle & 1598 & 3553 \\ Leaving & 1664 & 5268 \\ Sleeping & 7866 & 10763 \\ Spare Time/ TV & 8555 & 8984 \\ Total & 20,358 & 30,469 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Frequency of activities in the Ordonez datasets. period of 40,005 min, which were recorded from fourteen sensors in the smart home A. In Kasteren home B, thirteen daily physical human activities were carried out in fourteen days over a period of 38,900 min, which were recorded from twenty-three binary sensors. In Kasteren home C, sixteen daily human activities that were carried out in nineteen days over a period of 25,486 min, which were carried out from 21 binary sensors. The timeline of the daily human activities for all Kasteren smart homes is segmented in time slots using the window size \(\Delta\)t = 1 min as well. Table 3 shows the number of observations for each activity in the Kasteren datasets. The raw sensor data from smart home provide the start time and end time of the sensor activations as well as the type ( such as pressure sensor), location (such as bed), and place (such as bedroom) of the sensors.