# A Scalable Solution to Detect Behavior Changes of Elderly People Living Alone
## 3 Method and Datasets
### Datasets  
To verify the validity of the proposed method, we have used two publicly available activity recognition datasets, namely CASAS HH126 (Center for Advanced Studies in Adaptive Systems [47]) and Kasteren House C ([48]). Both these testbeds are equipped exclusively with binary sensors.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Activity Level (AL)** & **Activity Deviation (AD)** &
\begin{tabular}{c} **Probability of False Alerts** \\ **(PFA)** \\ \end{tabular} \\ \hline LOW & LOW & MEDIUM \\ LOW & MEDIUM & LOW \\ LOW & HIGH & LOW \\ MEDIUM & MEDIUM & MEDIUM \\ MEDIUM & HIGH & LOW \\ HIGH & LOW & HIGH \\ HIGH & HIGH & HIGH \\ \hline \hline \end{tabular}
\end{table}
Table 1: The rule base of the fuzzy inference system for filtering false alerts.  
Figure 8: Fuzzy domains (LOW, MEDIUM, HIGH) and membership functions (\(\mu\)) for AL and AD, used to compute the probability of false alerts (PFA).  
The HHI126 testbed has only passive infrared (PIR) motion detectors, with binary output. The locations of sensors are marked as M001-M015 on the floor plan of this house, shown in Figure 5a.  
For this spatial distribution of the sensors the correspondence between the BMPs and the sensors for HH126 is described by (1).  
For Kasteren House C, the correspondence between BMPs and sensors is defined by the following equations:  
\[\begin{array}{l}\{P_{1}\}=\{S05\}\cup\{S29\}\cup\{S39\}\\ \{P_{2}\}=\{S07\}\cup\{S13\}\cup\{S18\}\cup\{S20\}\cup\{S21\}\cup\{S22\}\cup\{ S23\}\cup\{S27\}\cup\{S30\}\\ \{P_{3}\}=\{S08\}\cup\{S10\}\cup\{S11\}\cup\{S16\}\cup\{S25\}\cup\{S35\}\cup\{ S38\}\\ \{P_{4}\}=\{S06\}\cup\{S15\}\cup\{S28\}\cup\{S36\}\end{array} \tag{8}\]  
where \(\{S_{k}\}\) is the set of events generated by the sensor \(S_{k}\).  
After some simple preprocessing on the raw sensor data (details in Ref. [43]), we have organized the sensor data into arrays sized 24 \(\times\) 4-one array for each day of monitoring. The 24 rows of these arrays contained the cumulative data for one hour intervals in the format:  
\[[|\{P_{1}\}|,\ |\{P_{2}\}|,\ |\{P_{3}\}|,\ |\{P_{4}\}|] \tag{9}\]  
where \(|\{P_{i}\}|\) is the cardinal of the set [Pi].  
The dataset for CASAS HH126 is not annotated, but it has an interesting feature that proved to be useful for this study: a number of 6 sensors from the total of 15 (namely: M002, M005, M006, M008, M014, M015) were added on 18 April 2014, after the recording started. Since all the sensors have equal importance, the increase of the number of sensors is equivalent--from the perspective of the activity monitoring system--to an increase of the general level of activity. This variation should be easily detected with the proposed method.  
The Kasteren House C dataset is much shorter (only 18 days from 20 November 2008 to 7 December 2008), but it is fully annotated. This allows a better selection of the reference interval, and also allowed us to manually select moments with unusual activities (e.g., getting a snack in the middle of the night) in order to verify the algorithm. A drawback of the Kasteren House C testbed is that, unlike CASAS HH126, which contains only motion detectors, it contains three pressure sensors installed under the bedroom beds and the living room couch. These sensors are triggered at the slightest motion and produce long series of events that can be wrongfully interpreted as high levels of activity during the night sleep or resting times. We tried to mitigate the influence of these sensors in the preprocessing phase by counting only the first event reported in a series and ignoring all the other events from the respective sensors for the next 10 min, but even with this adjustment they still produced a number of false alerts.