## 2 Dataset Description
### Segmentation and Preprocessing  
The audio files helped in the identification of the start and stop time instants for each recorded activity. From the labelled recorded accelerometer data, we extracted a signal window of 3 s each time a peak was found, that is, when the following conditions were verified:  
1. the magnitude of the signal \(m_{t}\) at time \(t\) was higher than 1.5\(g\), with \(g\) being the gravitational acceleration;  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Action** & **Iteration** \\ \hline Start the registration & \\ Put the smartphone in the pocket & \\ _clap_ & \\ _fall_ & 6 times \\ _clap_ & \\ Pull the smartphone from the pocket & \\ Stop the registration & \\ \hline \hline \end{tabular}
\end{table}
Table 6: Protocol for each fall.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Protocol** & **Action** & **Iteration** \\ \hline \multirow{7}{*}{Protocol 3} & Start the registration & 1 time \\  & Put the smartphone in the pocket & 1 time \\ \cline{2-3}  & _clap_ & \\ \cline{2-3}  & _clap_ & \\ \cline{2-3}  & Standing up from sliding & 5 times \\ \cline{2-3}  & _clap_ & \\ \cline{2-3}  & Standing up from laying & \\ \cline{2-3}  & _clap_ & \\ \cline{2-3}  & _Vait 2 s_ & \\ \cline{2-3}  & Pull the smartphone from the pocket & 1 time \\ \cline{2-3}  & Stop the registration & \\ \hline \hline \end{tabular}
\end{table}
Table 5: _Cont._2. the magnitude \(m_{t-1}\) at the previous time instant \(t-1\) was lower than \(1.5g\).  
Each signal window of 3 s was centered around each peak and it is likely that several overlaps between subsequent windows may happen. We adopted this segmentation technique instead of selecting overlapped sliding windows because our dataset is mostly focused on motion-related recognition of ADLs and falls. The choice of taking 3 s window has been motivated by: (i) the cadence of an average person walking is within 90-130 steps/min [30; 53]; (ii) at least a full walking cycle (two steps) is preferred on each window sample.  
Figure 3 shows samples of acceleration shapes. For each activity, we displayed the average magnitude shape obtained by averaging all the subjects' shapes.  
Since the device used for data acquisition records accelerometer data with a sample frequency of 50 Hz, for each activity, the accelerometer data vector is made of 3 vectors of 151 values (a vector of size \(1\times 453\)), one for each acceleration direction. The dataset is thus composed of 11,771 samples describing both ADLs (7759) and falls (4192) not equally distributed across activity types. This is because the activity of running and walking were performed by subjects for a time longer than the time spent for other activities. Originally, 6000 time windows of the running activity were found. In order to make the final dataset as much as balanced, we have deleted about 4000 samples related to running activities. The resulting samples distribution is plotted in Figure 4, where the samples related to running activities are about 2000. On our web site we release both datasets, the one balanced and the original one.  
We preprocessed the acceleration signal \(s(t)\) in order to remove the gravitational component \(g(t)\). Since the gravitational force is assumed to have only low frequency components, we applied a Butterworth (\(BW\)) low-pass filter with a cut off frequency of 0.3 Hz [30]: \(g(t)=BW(s(t),0.3)\). The accelerometer data without gravitational component is then obtained as: \(s(t)=s(t)-g(t)\). The dataset is freely downloadable at the following address: [[http://www.sal.disco.unimib.it/technologies/unimib-shar/](http://www.sal.disco.unimib.it/technologies/unimib-shar/)]([http://www.sal.disco.unimib.it/technologies/unimib-shar/](http://www.sal.disco.unimib.it/technologies/unimib-shar/)).  
Figure 3: Samples of acceleration shapes.