## Motivation

Our task is to recognize human activities and postural transitions based on the oscillogram recorded by smartphone. This task can be employed to provide support in many applications, for example, the system can be used to detect people's presence and the activation so that it is possible to infer the activities performed and places showed based on the sensors signals along with other relevant aspects. Also, this system is capable to monitor sleeping, sitting and walking time during the day. Consequently, the collected Human activity recognition information can be exploited to anticipate future people requirements.

## Data

The data is downloaded from UCI data repository. The original data was recorded by a smartphone. 30 volunteers, whose age was from 19-48 years, carried out the experiment. They were wearing a Samsung galaxy SII on the waist with embedded accelerometer and gyroscope to capture acceleration and angular velocity.

Figure 1. The axis orientation of the inertial sensors

Three static postures (standing, sitting, and lying) and three dynamic activities (walking, walking downstairs, and walking upstairs) were recorded by each volunteer. The data set also includes postural transitions occurred between the static postures (stand-to-sit, sit-to-stand, sit-to-lie, lie-to-sit, stand-to-lie, and lie-to-stand).

## Features

The features selected for this database come from the time domain oscillogram recorded by 3-axial accelerometer and gyroscope. A Fast Fourier Transform (FFT) was applied to some of these signals producing frequency domain signals. A sample feature is shown below:

Figure 2. Illustration of a sample feature (mean acceleration in y direction) in time domain (orange) and frequency domain (grey) extracted from one piece of data recorded by the smartphone

Time domain features:

- Body and gravity linear acceleration and angular velocity (XYZ directions): mean value, standard deviation, max value, min value, signal magnitude area, energy, interquartile range, signal entropy, autoregressive coefficient. correlation coefficient.
- Acceleration: Angle between two vectors.

Frequency domain features:

- body and gravity linear acceleration and angular velocity (XYZ directions): mean value, standard deviation, max value, min value, signal magnitude area, energy, interquartile range, signal entropy, autoregressive coefficients, correlation coefficient.
- Angular velocity(XYZ): index of the frequency component with largest magnitude, weighted average of the frequency components to obtain a mean frequency, skewness of the frequency domain signal, kurtosis of the frequency domain signal, energy of a frequency interval within the 64 bins of the FFT of each window.

The 561 attributes were numerical attributes. There were 10930 examples in the dataset and 70% of the data selected as training set, and the remaining 30% would be the test set.

## Method

Four different algorithms are applied to this classification task: Logistic Regression (LR), Support Vector Machine (SVM), Neural Network (NN) and Decision Tree (DT). Because each team member has expertise in different software, the four methods were implemented on different platforms. Below is a summary of algorithms and platforms used:

LR R and Weka

SVM MATLAB (coded by ourselves) and Weka

NN MATLAB (Neural Net Fitting Toolbox)

DT Weka

To obtain best performance, for different algorithms, different subset of features/attributes are used, as summarized below:

LR frequency domain attributes (259)

SVM the frequency domain attributes of body linear acceleration and angular velocity

NN all attributes (561)

DT frequency domain attributes (259)

**Method Platform**LR R and Weka

SVM MATLAB (coded by ourselves) and Weka

NN MATLAB (Neural Net Fitting Toolbox)

DT Weka

To obtain best performance, for different algorithms, different subset of features/attributes are used, as summarized below:

**Method Attributes**LR frequency domain attributes (259)

SVM the frequency domain attributes of body linear acceleration and angular velocity

NN all attributes (561)

DT frequency domain attributes (259)

## Result

The accuracy achieved by each method:

Please refer to our report to get the analysis and discussion over these results.

**Method**LR SVM NN DT**Accuracy by R/MATLAB**0.879 0.74 0.812**Accuracy by Weka**0.9 0.837 0.858Please refer to our report to get the analysis and discussion over these results.