3.1.2. Feature Extraction

Feature extraction is the most important part of mining contexts, since the selected features play a crucial role in determining the user's situation. In the past, many complex features extraction techniques such as Principal Component Analysis (PCA) followed by Linear Discriminant Analysis (LDA) [32] and wavelet features [33] were used; however, they are computationally expensive and difficult to implement inside the smartphone environment, as they require a strong statistical background. Many researchers reported that simple and low cost computational features, such as mean, median and standard deviation, and low and high pass filters are able to achieve high accuracy [33,34]. First, we solve the orientation issue of acceleration data suggested by Mizell [35] and then reduce the complexity of feature computation for mobile devices by extracting the time and frequency domain

features, which are the mean, standard deviation and energy feature. We extract the mean to measure the central tendency, the standard deviation to measure the data spread for different activities and the energy feature to find the quantitative characteristics of the data over a defined time period. In order to capture the characteristics of environmental sound, we extract the Mel-Frequency Cepstral Coefficients (MFCC) feature vector. It is calculated on the basis of Fast Fourier Transformation (FFT), which is closest to the human auditory system due to the utilized Mel-scale filter bank and represented as the short-term power spectrum of a sound [36]. The calculation of MFCC can be structured into several steps. Figure 2 shows the block diagram for calculating the MFCC feature.

**Figure 2.** Block diagram of MFCC feature vector calculation.

After the feature extraction step, the feature vector is supplied to the classifier to know the current context of the user.
