3.1.1. Sensor Data Acquisition

We collect the temporal sensory data stream of the onboard tri-axial accelerometer and audio sensor of the smartphone. The accelerometer sensor is capable of measuring the acceleration in three orthogonal directions (i.e., *x*, *y* and *z* axis). These raw signals need to be pre-processed to segment the continuous temporal data before extracting the feature set. Therefore, we apply the time-based windowing method to divide it into fixed time segments (i.e., 3 s) [30]. The selection of time-based windowing is based on the its good handling of continuous data [15,28,31]. The audio data stream is an important source to know the user contexts by processing the environmental sound. We collected the audio data stream and applied signal segmentation by dividing it into fixed time segments (i.e., 8 s). The duration of fixed time segments is based on the analysis of audio data, and it will be enough to process for mining contexts. In order to maintain the user privacy, we did not store the audio signal, nor accelerometer signal, but rather, we processed it immediately in real time.
