# Daily Human Physical Activity Recognition Based on Kernel Discriminant Analysis and Extreme Learning Machine

Authors: Wendong Xiao; Yingjie Lu
Journal: Mathematical Problems in Engineering
 (2015)

---

## Abstract

Wearable sensor based human physical activity recognition has extensive applications in many fields such as physical training and health care. This paper will be focused on the development of highly efficient approach for daily human activity recognition by a triaxial accelerometer. In the proposed approach, a number of features, including the tilt angle, the signal magnitude area (SMA), and the wavelet energy, are extracted from the raw measurement signal via the time domain, the frequency domain, and the time-frequency domain analysis. A nonlinear kernel discriminant analysis (KDA) scheme is introduced to enhance the discrimination between different activities. Extreme learning machine (ELM) is proposed as a novel activity recognition algorithm. Experimental results show that the proposed KDA based ELM classifier can achieve superior recognition performance with higher accuracy and faster learning speed than the back-propagation (BP) and the support vector machine (SVM) algorithms.


---

## Body

## 1. Introduction

Recognition of physical activity plays an important role in many fields such as physical training and health care. In particular nowadays, faced with the aging problem, a growing number of old people live alone and urgently demand advanced solutions for their health monitoring, including their physical activity recognition.A number of key research issues are related to physical activity recognition, including how to improve the data collection mechanisms, how to select more effective features, and how to design high-performance classification algorithms. Different solutions have been proposed to address these issues, usually based on the video analysis and the wearable sensor signal analysis. The video analysis approach needs to obtain the position and attitude information from a series of body image sequences. Due to the complexity and the variability of the human physical activities, it often suffers from low accuracy and low efficiency in many practical scenarios. It is also weak for privacy of the monitored person [1, 2]. With the development of microelectromechanical system (MEMS) and wearable sensor networks, activity recognition approaches based on the wearable sensors, especially accelerometers, have received increasing interests, due to their advantages that can be implemented easily anywhere anytime [3–8].In previous studies, many researchers use multiple sensors for physical activity recognition to improve the accuracy. But the hardware would obstruct the movements of the human and is not practical for long-term wearing. Also the cost of system will increase with the number of sensors [3–5]. Therefore recently more researchers are seeking activity recognition approaches by using only one accelerometer sensor for collecting the signal [6–8].Feature extraction is crucial for activity recognition. It is required to extract useful features from the raw measurement data to reduce the processing time and improve the recognition accuracy. Based on the accelerometer data, a number of features and feature extraction methods have been proposed, covering from the time domain analysis and the frequency domain analysis to the time-frequency domain analysis [4, 9]. The time domain method extracts features, such as the mean, the standard deviation, and the correlation coefficient, from the collected signal directly. The frequency domain method extracts features from the frequency-domain parameters, such as FFT coefficients. More recently, wavelet analysis, which can incorporate time and frequency information, has been used to perform the time-frequency analysis.Classifier is the key for activity recognition. Besides the high accuracy and short training time, the classifier is often expected to meet the real-time and the generalization requirements. A large number of classification methods have been investigated, including the artificial neural network (ANN) [7] and the support vector machine (SVM) [10], which have been widely used in machine learning and data analysis. But these popular learning techniques often face some challenging issues such as intensive human intervene, slow learning speed, and poor learning scalability [11–13]. Therefore, the recent extreme learning machine (ELM) [11] classifier will be proposed in this paper as a highly efficient and accurate activity recognition approach.ELM is developed as a single-hidden layer feed-forward network (SLFN) that can randomly assign the weights between the input nodes and the hidden nodes and analytically determine the output weights between the hidden nodes and output nodes. It learns much faster than traditional gradient-based approaches, such as back-propagation (BP) algorithm. ELM tends to reach the small norm of the network output weights and achieve better generalization performance according to Bartlett’s theory states [12]. In theory, ELM with the same kernels outperforms SVM in both regression and classification applications [13, 14]. ELM provides efficient unified solutions to generalized feed-forward networks including but not limited to neural networks, radial basis function (RBF) networks, and kernel learning [15]. Many improvements of ELM are under study in recent years, such as fast online learning [16], large scale ELM [17], and voting based ELM [18]. Also various applications can be found based on ELM and its variants, including wireless indoor localization [19], multicollinear problem [20, 21], and protein sequence classification [22].The patterns of the physical activities vary from simple activities (such as standing, sitting, and walking) to more complex action strings (such as eating, drinking, and cycling). With the addition of new activities, the features of the existing systems may be ineffective, and the recognition accuracy may decrease significantly. To find new features will increase the workload of the researchers, and classifier design will become difficult with the increase of the number of the features. Principal component analysis (PCA) [23] and linear discriminant analysis (LDA) [7, 24] are applied to select most discriminative features for activity recognition. Kernel discriminant analysis (KDA) [10, 25] is an extension of LDA to obtain nonlinear discriminating features by the kernel technique for mapping the data to the feature space. In this paper, we will introduce KDA to extract more meaningful features of the activities and integrate it with ELM classifier to achieve improved classification performance.The paper is organized as follows. The proposed approach is detailed in Section2, including its general description, system design, data acquisition and preprocessing, feature extraction method, KDA, and the ELM algorithm. Experimental results are reported in Section 3. Finally, conclusions and the future work are given in Section 4.


## 2. Proposed Approach

The proposed activity recognition approach uses a triaxial accelerometer for data collection. As shown in Figure1, the overall approach consists of the following steps: data acquisition, preprocessing, feature extraction, KDA, ELM training and classification.Figure 1
The architecture of the proposed activity recognition approach.


### 2.1. Wearable Component

The wearable sensor in this paper employs a MPU-6000 sensor, which contains a triaxial accelerometer and a triaxial gyroscope. The triaxial accelerometer is used to collect the raw acceleration measurement signal. The sampling frequency is set at 50 Hz with the output ranging in[
-
4
g
,
+
4
g
]. The sensor transmits the data to a mobile phone via Bluetooth module called HC-05 and the data are stored in the SD card of the phone.The wearable sensor is small and convenient to carry and is worn on the subject’s thigh of right leg, as shown in Figure2. When the body wears the accelerometer at the state of standing, the x-axis represents the acceleration in the lateral direction, the y-axis represents the acceleration in the longitudinal direction, and the z-axis represents the acceleration in the vertical direction. In order to facilitate observations, the measurement of each axis is divided by the gravitational acceleration (taken as 9.8 m/s2); therefore, the data are multiples of the gravitational acceleration.Figure 2
Wearable sensor being worn by a subject.


### 2.2. Data Acquisition and Preprocessing

In the experiments, 10 subjects’ data are collected, 5 females and 5 males, wearing the wearable sensor each day for a period to collect data for six different activities of daily life, including sitting, standing, walking, running, going upstairs, and going downstairs. Figure3 shows the example acceleration signals of sitting and walking for each axis of the triaxial accelerometer.Figure 3
The raw acceleration signals of sitting and walking.As the sensor will be influenced by the gravity, the data are filtered by a high-pass filter with a cut-off frequency of 0.5 Hz to eliminate the influence of the gravity. As the frequency of human daily activities is not too high, a low-pass filter with a cut-off frequency of 20 Hz is used to filter high frequency noise. In addition, the data are smoothed by median filter to eliminate independent noise.


### 2.3. Feature Extraction

Features are extracted from the raw accelerometer data over the sliding window. In this paper, features were computed from 128 sampling points (2.56 s) with 64 samples overlapping between the consecutive sliding windows. Feature extraction on sliding windows with 50% overlap has been shown to be effective in previous studies on activity classification [4].A number of features, including the mean, the standard deviation, the median, the correlation, the tilt angle (TA), the signal magnitude area (SMA), the frequency energy, the frequency entropy, and the wavelet energy, were extracted from the signals for activity recognition. A brief description of each feature is given as follows.(
1) Tilt Angle (TA). No matter what the state of the device is, there will be vertical gravity. When tilting the device, there will be a gravitational component in the z-axis. The tilt angle refers to the relative tilt of the body in space and is calculated from the acceleration in the z-axis according to(1)
θ
=
a
r
c
c
o
s
a
z
g
,where a
z is the gravity component in the z-axis and g is the gravity coefficient.(
2) Signal Magnitude Area (SMA). We adopt the SMA to extract a feature quantity according to(2)
S
M
A
=
∑
i
=
1
N
x
i
+
y
i
+
z
i
,where x
i, y
i, and z
i indicate the values of x-axis, y-axis, and z-axis acceleration signals at the ith sampling point after preprocessing and N is the length of the sliding window. SMA can indicate the fluctuation degree of the acceleration signal; the higher its value is, the more violent the fluctuation is.(
3) Wavelet Energy (WE). This paper uses db5 as the mother wavelet. By decomposing the vertical component to 5 layers, WE is calculated as the sum of the squared detail coefficients at levels 4 and 5, according to(3)
W
E
=
∑
j
=
4
5
C
D
j
2
,where C
D
j are the detail coefficients of y-axis acceleration signal.(
4) Other Features. Mean, standard deviation, and median are the average, standard deviation, and median value of the signal over the sliding window, respectively. Correlation coefficient is calculated between the y-axis and z-axis of accelerometer signal. The frequency energy feature is calculated as the sum of the squared magnitudes of the discrete FFT components of the signal. Entropy is calculated as the normalized information entropy magnitudes of the discrete FFT components of the signal.Figure4 shows some of these features for different activities. We can find that it is easy to distinguish some activities, such as sitting and standing, but the differences among walking, going upstairs, and going downstairs are not significant, likely to cause misrecognition.Figure 4
Difference in feature values for discriminating different activities.


### 2.4. Kernel Discriminant Analysis (KDA)

In order to improve the classification accuracy, further operations on the derived features are performed.Linear discriminant analysis (LDA) is a supervised dimensionality reduction technique used for data analysis and pattern recognition. LDA tries to maximize the separation between different classes and minimize the separation within the same class simultaneously. KDA is a nonlinear extension of LDA to obtain nonlinear discriminating features by the kernel technique [26]. In KDA, input data are mapped to the high dimensional feature space F by nonlinear feature mapping ϕ
:
R
n
→
F. We select Gaussian radial basis function (RBF) for ϕ. In KDA, the cross class and intraclass scatter matrices are computed as(4)
S
B
ϕ
=
∑
i
=
1
c
N
i
μ
i
ϕ
-
μ
ϕ
μ
i
ϕ
-
μ
ϕ
T
,
S
W
ϕ
=
∑
i
=
1
c
∑
x
∈
X
i
ϕ
x
-
μ
i
ϕ
ϕ
x
-
μ
i
ϕ
T
,where N
i is the number of samples from the ith class, c is the number of classes, μ
i
ϕ is the centroid of the ith class and μ
ϕ is the global centroid, x is a vector for a specific class, and X
i is the set of samples of the ith class. S
W
ϕ represents the degree of scattering within classes of activities and is calculated as the summation of covariance matrices of each class, whereas S
B
ϕ represents the degree of scattering between classes of activities and is calculated as the summation of the covariance matrix of the means of each class. The optimal discrimination transformation in the projection space is obtained by solving the following optimization problem:(5)
ω
o
p
t
=
a
r
g
m
a
x
ω
ω
T
S
B
ϕ
ω
ω
T
S
W
ϕ
ω
.The optimization solutionω
o
p
t, corresponding to the largest eigenvalues λ, can be explained by the generalized eigenvalue problem:(6)
S
B
ϕ
ω
i
=
λ
i
S
W
ϕ
ω
i
.It is proved that the above equation can be equivalently represented as(7)
A
o
p
t
=
a
r
g
m
a
x
A
A
T
K
W
K
A
A
T
K
K
A
.The corresponding eigenvalue problem is represented as(8)
K
W
K
A
=
λ
K
K
A
,where K is the kernel matrix with its element defined as(9)
K
i
j
=
k
x
i
,
x
j
,where k
(
·
,
·
) is a positive semidefinite kernel function and W is a matrix with its element defined as(10)
W
i
j
=
1
n
c
,
i
f
x
i
a
n
d
x
j
b
e
l
o
n
g
t
o
t
h
e
c
t
h
c
l
a
s
s
0
,
o
t
h
e
r
w
i
s
e
.More details on KDA can be found in [26].


### 2.5. ELM Algorithm

Extreme learning machine (ELM) was introduced by Huang et al. [11], originally proposed for standard single-hidden layer feed-forward neural networks (SLFNs), with random hidden nodes, and has recently been extended to kernel learning as well [27]. Compared with traditional training methods, ELM has the advantages of high accuracy, fast learning speed, and good generalization property. It can provide a unified learning platform with widespread type of feature mappings and can be applied in regression and multiclass classification applications directly.Figure5 is the structure of ELM. The network consists of an input layer, a hidden layer, and an output layer. For N arbitrary distinct samples x
i
,
t
i, denote the input signal vector x
i
=
x
i
1
,
x
i
2
,
…
,
x
i
m
T
∈
R
m and the output signal vector t
i
=
t
i
1
,
t
i
2
,
…
,
t
i
n
T
∈
R
n, and w
j
=
w
j
1
,
w
j
2
,
…
,
w
j
m
T is the weight vector connecting the jth hidden node and the input nodes, β
j
=
β
j
1
,
β
j
2
,
…
,
β
j
n
T is the weight vector connecting the jth hidden node and the output nodes, and b
j is the threshold of the jth hidden node.Figure 5
The structure of ELM.The activation function of hidden layer neurons isg
x, and the hidden layer has L neurons. There exist w
j, β
j, and b
j such that(11)
∑
j
=
1
L
β
j
g
w
j
x
i
+
b
j
=
t
i
,
i
=
1
,
…
,
N
.Denote the output of the network as(12)
T
=
t
1
T
⋮
t
N
T
N
×
n
.Then (11) can be rewritten as(13)
H
β
=
T
,where H is the hidden layer output matrix of the ELM: (14)
H
w
1
,
w
2
,
…
,
w
L
,
b
1
,
b
2
,
…
,
b
L
,
x
1
,
x
2
,
…
,
x
N
=
g
w
1
x
1
+
b
1
g
w
2
x
1
+
b
2
⋯
g
w
1
x
2
+
b
1
g
w
2
x
2
+
b
2
⋯
⋮
⋮
⋱
g
w
1
x
N
+
b
1
g
w
2
x
N
+
b
2
⋯
g
w
L
x
1
+
b
L
g
w
L
x
2
+
b
L
⋮
g
w
L
x
N
+
b
L
N
×
L
,
β
=
β
1
T
⋮
β
L
T
L
×
n
.According to the theorem proven in [11], when the activation function is infinitely differentiable, and L
≤
N, the parameters of SLFNs do not need all to be adjusted. Parameters w and b can be selected randomly before training and remain constant during the training process. To train SLFNs is simply equivalent to finding a least-square solution β
^ of the linear system H
β
=
T; that is,(15)
H
β
^
-
T
=
min
β
⁡
H
β
-
T
.Then the optimal output weights can be calculated as(16)
β
=
H
†
T
,where H
† is the Moore-Penrose generalized inverse of the matrix H.


## 2.1. Wearable Component

The wearable sensor in this paper employs a MPU-6000 sensor, which contains a triaxial accelerometer and a triaxial gyroscope. The triaxial accelerometer is used to collect the raw acceleration measurement signal. The sampling frequency is set at 50 Hz with the output ranging in[
-
4
g
,
+
4
g
]. The sensor transmits the data to a mobile phone via Bluetooth module called HC-05 and the data are stored in the SD card of the phone.The wearable sensor is small and convenient to carry and is worn on the subject’s thigh of right leg, as shown in Figure2. When the body wears the accelerometer at the state of standing, the x-axis represents the acceleration in the lateral direction, the y-axis represents the acceleration in the longitudinal direction, and the z-axis represents the acceleration in the vertical direction. In order to facilitate observations, the measurement of each axis is divided by the gravitational acceleration (taken as 9.8 m/s2); therefore, the data are multiples of the gravitational acceleration.Figure 2
Wearable sensor being worn by a subject.


## 2.2. Data Acquisition and Preprocessing

In the experiments, 10 subjects’ data are collected, 5 females and 5 males, wearing the wearable sensor each day for a period to collect data for six different activities of daily life, including sitting, standing, walking, running, going upstairs, and going downstairs. Figure3 shows the example acceleration signals of sitting and walking for each axis of the triaxial accelerometer.Figure 3
The raw acceleration signals of sitting and walking.As the sensor will be influenced by the gravity, the data are filtered by a high-pass filter with a cut-off frequency of 0.5 Hz to eliminate the influence of the gravity. As the frequency of human daily activities is not too high, a low-pass filter with a cut-off frequency of 20 Hz is used to filter high frequency noise. In addition, the data are smoothed by median filter to eliminate independent noise.


## 2.3. Feature Extraction

Features are extracted from the raw accelerometer data over the sliding window. In this paper, features were computed from 128 sampling points (2.56 s) with 64 samples overlapping between the consecutive sliding windows. Feature extraction on sliding windows with 50% overlap has been shown to be effective in previous studies on activity classification [4].A number of features, including the mean, the standard deviation, the median, the correlation, the tilt angle (TA), the signal magnitude area (SMA), the frequency energy, the frequency entropy, and the wavelet energy, were extracted from the signals for activity recognition. A brief description of each feature is given as follows.(
1) Tilt Angle (TA). No matter what the state of the device is, there will be vertical gravity. When tilting the device, there will be a gravitational component in the z-axis. The tilt angle refers to the relative tilt of the body in space and is calculated from the acceleration in the z-axis according to(1)
θ
=
a
r
c
c
o
s
a
z
g
,where a
z is the gravity component in the z-axis and g is the gravity coefficient.(
2) Signal Magnitude Area (SMA). We adopt the SMA to extract a feature quantity according to(2)
S
M
A
=
∑
i
=
1
N
x
i
+
y
i
+
z
i
,where x
i, y
i, and z
i indicate the values of x-axis, y-axis, and z-axis acceleration signals at the ith sampling point after preprocessing and N is the length of the sliding window. SMA can indicate the fluctuation degree of the acceleration signal; the higher its value is, the more violent the fluctuation is.(
3) Wavelet Energy (WE). This paper uses db5 as the mother wavelet. By decomposing the vertical component to 5 layers, WE is calculated as the sum of the squared detail coefficients at levels 4 and 5, according to(3)
W
E
=
∑
j
=
4
5
C
D
j
2
,where C
D
j are the detail coefficients of y-axis acceleration signal.(
4) Other Features. Mean, standard deviation, and median are the average, standard deviation, and median value of the signal over the sliding window, respectively. Correlation coefficient is calculated between the y-axis and z-axis of accelerometer signal. The frequency energy feature is calculated as the sum of the squared magnitudes of the discrete FFT components of the signal. Entropy is calculated as the normalized information entropy magnitudes of the discrete FFT components of the signal.Figure4 shows some of these features for different activities. We can find that it is easy to distinguish some activities, such as sitting and standing, but the differences among walking, going upstairs, and going downstairs are not significant, likely to cause misrecognition.Figure 4
Difference in feature values for discriminating different activities.


## 2.4. Kernel Discriminant Analysis (KDA)

In order to improve the classification accuracy, further operations on the derived features are performed.Linear discriminant analysis (LDA) is a supervised dimensionality reduction technique used for data analysis and pattern recognition. LDA tries to maximize the separation between different classes and minimize the separation within the same class simultaneously. KDA is a nonlinear extension of LDA to obtain nonlinear discriminating features by the kernel technique [26]. In KDA, input data are mapped to the high dimensional feature space F by nonlinear feature mapping ϕ
:
R
n
→
F. We select Gaussian radial basis function (RBF) for ϕ. In KDA, the cross class and intraclass scatter matrices are computed as(4)
S
B
ϕ
=
∑
i
=
1
c
N
i
μ
i
ϕ
-
μ
ϕ
μ
i
ϕ
-
μ
ϕ
T
,
S
W
ϕ
=
∑
i
=
1
c
∑
x
∈
X
i
ϕ
x
-
μ
i
ϕ
ϕ
x
-
μ
i
ϕ
T
,where N
i is the number of samples from the ith class, c is the number of classes, μ
i
ϕ is the centroid of the ith class and μ
ϕ is the global centroid, x is a vector for a specific class, and X
i is the set of samples of the ith class. S
W
ϕ represents the degree of scattering within classes of activities and is calculated as the summation of covariance matrices of each class, whereas S
B
ϕ represents the degree of scattering between classes of activities and is calculated as the summation of the covariance matrix of the means of each class. The optimal discrimination transformation in the projection space is obtained by solving the following optimization problem:(5)
ω
o
p
t
=
a
r
g
m
a
x
ω
ω
T
S
B
ϕ
ω
ω
T
S
W
ϕ
ω
.The optimization solutionω
o
p
t, corresponding to the largest eigenvalues λ, can be explained by the generalized eigenvalue problem:(6)
S
B
ϕ
ω
i
=
λ
i
S
W
ϕ
ω
i
.It is proved that the above equation can be equivalently represented as(7)
A
o
p
t
=
a
r
g
m
a
x
A
A
T
K
W
K
A
A
T
K
K
A
.The corresponding eigenvalue problem is represented as(8)
K
W
K
A
=
λ
K
K
A
,where K is the kernel matrix with its element defined as(9)
K
i
j
=
k
x
i
,
x
j
,where k
(
·
,
·
) is a positive semidefinite kernel function and W is a matrix with its element defined as(10)
W
i
j
=
1
n
c
,
i
f
x
i
a
n
d
x
j
b
e
l
o
n
g
t
o
t
h
e
c
t
h
c
l
a
s
s
0
,
o
t
h
e
r
w
i
s
e
.More details on KDA can be found in [26].


## 2.5. ELM Algorithm

Extreme learning machine (ELM) was introduced by Huang et al. [11], originally proposed for standard single-hidden layer feed-forward neural networks (SLFNs), with random hidden nodes, and has recently been extended to kernel learning as well [27]. Compared with traditional training methods, ELM has the advantages of high accuracy, fast learning speed, and good generalization property. It can provide a unified learning platform with widespread type of feature mappings and can be applied in regression and multiclass classification applications directly.Figure5 is the structure of ELM. The network consists of an input layer, a hidden layer, and an output layer. For N arbitrary distinct samples x
i
,
t
i, denote the input signal vector x
i
=
x
i
1
,
x
i
2
,
…
,
x
i
m
T
∈
R
m and the output signal vector t
i
=
t
i
1
,
t
i
2
,
…
,
t
i
n
T
∈
R
n, and w
j
=
w
j
1
,
w
j
2
,
…
,
w
j
m
T is the weight vector connecting the jth hidden node and the input nodes, β
j
=
β
j
1
,
β
j
2
,
…
,
β
j
n
T is the weight vector connecting the jth hidden node and the output nodes, and b
j is the threshold of the jth hidden node.Figure 5
The structure of ELM.The activation function of hidden layer neurons isg
x, and the hidden layer has L neurons. There exist w
j, β
j, and b
j such that(11)
∑
j
=
1
L
β
j
g
w
j
x
i
+
b
j
=
t
i
,
i
=
1
,
…
,
N
.Denote the output of the network as(12)
T
=
t
1
T
⋮
t
N
T
N
×
n
.Then (11) can be rewritten as(13)
H
β
=
T
,where H is the hidden layer output matrix of the ELM: (14)
H
w
1
,
w
2
,
…
,
w
L
,
b
1
,
b
2
,
…
,
b
L
,
x
1
,
x
2
,
…
,
x
N
=
g
w
1
x
1
+
b
1
g
w
2
x
1
+
b
2
⋯
g
w
1
x
2
+
b
1
g
w
2
x
2
+
b
2
⋯
⋮
⋮
⋱
g
w
1
x
N
+
b
1
g
w
2
x
N
+
b
2
⋯
g
w
L
x
1
+
b
L
g
w
L
x
2
+
b
L
⋮
g
w
L
x
N
+
b
L
N
×
L
,
β
=
β
1
T
⋮
β
L
T
L
×
n
.According to the theorem proven in [11], when the activation function is infinitely differentiable, and L
≤
N, the parameters of SLFNs do not need all to be adjusted. Parameters w and b can be selected randomly before training and remain constant during the training process. To train SLFNs is simply equivalent to finding a least-square solution β
^ of the linear system H
β
=
T; that is,(15)
H
β
^
-
T
=
min
β
⁡
H
β
-
T
.Then the optimal output weights can be calculated as(16)
β
=
H
†
T
,where H
† is the Moore-Penrose generalized inverse of the matrix H.


## 3. Approach Implementation and Experimental Results

In this section, we will implement the approach for extracting features of the data, using KDA to map the features to the high dimensional feature space, applying ELM algorithm to classify the samples and comparing ELM with other classic classifiers.


### 3.1. Recognition Using KDA on Original Features

The difference of the features among the three activities (walking, going upstairs, and going downstairs) is not so significant. Therefore, KDA is implemented to deal with the problem. The 3D plot in Figure6 shows the low intraclass variance and high cross class variance for the three activities. Figure 6(a) shows the three features, SMA, TA, and WE, extracted from the collected samples. It is difficult to classify them. Figure 6(b) shows significantly improved discrimination among the three activities after the KDA operation.Figure 6
Features without and with KDA operations.
(a)
3D feature space representation on original features
(b)
3D feature space representation for KDA implementation on original features


### 3.2. Classification Results

In this subsection, we will compare the classification performance among ELM, BP, and SVM classifiers. All the experiments for the algorithms are carried out in MATLAB 8.0 environment running in an Inter i5, 2.6 GHz CPU. There are many variants of BP and SVM algorithms. Levenberg Marquardt BP (LM-BP) and least-square SVM (LS-SVM) [28] are used in this paper.The data are randomly divided into two sets, namely, the training set and the testing set. The classification process consists of two parts, generating the model by the training set and testing the performance of the model by the testing set. In our experiments, all the inputs (attributes) have been normalized into the range[
0,1
]. Table 1 shows the confusion matrices between the 6 classes of activities (including sitting, standing, walking, running, going upstairs, and going downstairs) for the algorithms. The row represents the actual class and the column represents the recognized class by the algorithms, and the element at the ith row and jth column of the confusion matrix represents the probability of the actual class i is recognized as class j by an algorithm. The probability was calculated by 1000 samples over the window of six activities. From the matrices, we can find that ELM can distinguish the 6 classes of activities better than LM-BP and LS-SVM in general, and the KDA implementation on original features can improve the classification performance.Table 1
The confusion matrices between the 6 classes of activities. R indicates running, ST indicates sitting, SD indicates standing, W indicates walking, U indicates going upstairs, and D indicates going downstairs.
(a)
ELM based on original features
R
ST
SD
W
U
D
R
1
0
0
0
0
0
ST
0
1
0
0
0
0
SD
0
0
0.999
0
0
0.001
W
0
0
0
0.985
0.005
0.01
U
0
0
0
0.015
0.968
0.017
D
0
0
0
0.021
0.009
0.97
(b)
ELM based on KDA features
R
ST
SD
W
U
D
R
1
0
0
0
0
0
ST
0
1
0
0
0
0
SD
0
0
1
0
0
0
W
0
0
0
1
0
0
U
0
0
0
0
0.999
0.001
D
0
0
0
0.001
0
0.999
(c)
LM-BP based on original features
R
ST
SD
W
U
D
R
0.998
0
0
0.002
0
0
ST
0
0.998
0
0
0.002
0
SD
0
0
0.996
0.003
0
0.001
W
0
0
0
0.98
0.006
0.014
U
0
0
0
0.018
0.962
0.02
D
0
0
0.006
0.024
0.012
0.958
(d)
LM-BP based on KDA features
R
ST
SD
W
U
D
R
1
0
0
0
0
0
ST
0
1
0
0
0
0
SD
0
0
1
0
0
0
W
0
0
0
0.99
0.006
0.004
U
0
0
0
0.01
0.988
0.002
D
0
0
0
0.009
0.006
0.985
(e)
LS-SVM based on original features
R
ST
SD
W
U
D
R
0.993
0
0
0.006
0
0.001
ST
0
0.996
0
0
0.004
0
SD
0
0
0.997
0.001
0
0.002
W
0
0
0
0.981
0.006
0.013
U
0
0
0
0.01
0.976
0.014
D
0
0
0
0.02
0.012
0.968
(f)
LS-SVM based on KDA features
R
ST
SD
W
U
D
R
1
0
0
0
0
0
ST
0
1
0
0
0
0
SD
0
0
1
0
0
0
W
0
0
0
0.998
0
0.002
U
0
0
0
0.003
0.993
0.004
D
0
0
0
0.002
0.002
0.996Furthermore, 50 trials have been conducted for a thorough comparison study and the average results are outputted as the classification results as shown in Table2. The classifier of KDA based ELM takes the shortest testing time (0.0012 s) and achieves the highest testing accuracy (99.81%). Although KDA based ELM takes slight more training time than the original ELM, it has better classification result than the original ELM. That is because KDA can achieve the low intraclass variance and high cross class variance for activities and improve the classification accuracy effectively.Table 2
Classification results of ELM, LM-BP, and LS-SVM classifiers.
Features
Classifier
Time (s)
Accuracy rate (%)
Training
Testing
Training
Testing
Original
ELM
0.0022
0.0031
96.44
96.07
KDA based
ELM
0.0031
0.0012
99.96
99.81
Original
LM-BP
1.8985
0.0175
95.59
95.24
KDA based
LM-BP
0.8861
0.0246
98.48
98.02
Original
LS-SVM
0.7775
0.1819
97.36
95.97
KDA based
LS-SVM
0.7678
0.2760
99.94
99.05As shown in Table2, KDA based LM-BP can classify samples faster than the original LM-BP and has higher classification accuracy. Also KDA based LS-SVM can improve the accuracy. We can find that the KDA strategy is useful in improving the recognition performance.Now we give the comparison among ELM, BP, and SVM classifiers. It can be found from Table2 that the classification accuracy of ELM, LM-BP, and LS-SVM based on the original features is not significantly different, but ELM has much faster learning speed (up to hundreds times) than LM-BP and LS-SVM. Based on the KDA implementation, ELM and LS-SVM can achieve better classification performance than LM-BP, but LS-SVM needs longer time for training than ELM. Also, the parameters of LS-SVM and LM-BP need to be determined before training, while ELM selects parameters randomly before training. Overall, the experiments demonstrate that ELM can achieve superior recognition performance compared with the LM-BP and LS-SVM classifiers.


## 3.1. Recognition Using KDA on Original Features

The difference of the features among the three activities (walking, going upstairs, and going downstairs) is not so significant. Therefore, KDA is implemented to deal with the problem. The 3D plot in Figure6 shows the low intraclass variance and high cross class variance for the three activities. Figure 6(a) shows the three features, SMA, TA, and WE, extracted from the collected samples. It is difficult to classify them. Figure 6(b) shows significantly improved discrimination among the three activities after the KDA operation.Figure 6
Features without and with KDA operations.
(a)
3D feature space representation on original features
(b)
3D feature space representation for KDA implementation on original features


## 3.2. Classification Results

In this subsection, we will compare the classification performance among ELM, BP, and SVM classifiers. All the experiments for the algorithms are carried out in MATLAB 8.0 environment running in an Inter i5, 2.6 GHz CPU. There are many variants of BP and SVM algorithms. Levenberg Marquardt BP (LM-BP) and least-square SVM (LS-SVM) [28] are used in this paper.The data are randomly divided into two sets, namely, the training set and the testing set. The classification process consists of two parts, generating the model by the training set and testing the performance of the model by the testing set. In our experiments, all the inputs (attributes) have been normalized into the range[
0,1
]. Table 1 shows the confusion matrices between the 6 classes of activities (including sitting, standing, walking, running, going upstairs, and going downstairs) for the algorithms. The row represents the actual class and the column represents the recognized class by the algorithms, and the element at the ith row and jth column of the confusion matrix represents the probability of the actual class i is recognized as class j by an algorithm. The probability was calculated by 1000 samples over the window of six activities. From the matrices, we can find that ELM can distinguish the 6 classes of activities better than LM-BP and LS-SVM in general, and the KDA implementation on original features can improve the classification performance.Table 1
The confusion matrices between the 6 classes of activities. R indicates running, ST indicates sitting, SD indicates standing, W indicates walking, U indicates going upstairs, and D indicates going downstairs.
(a)
ELM based on original features
R
ST
SD
W
U
D
R
1
0
0
0
0
0
ST
0
1
0
0
0
0
SD
0
0
0.999
0
0
0.001
W
0
0
0
0.985
0.005
0.01
U
0
0
0
0.015
0.968
0.017
D
0
0
0
0.021
0.009
0.97
(b)
ELM based on KDA features
R
ST
SD
W
U
D
R
1
0
0
0
0
0
ST
0
1
0
0
0
0
SD
0
0
1
0
0
0
W
0
0
0
1
0
0
U
0
0
0
0
0.999
0.001
D
0
0
0
0.001
0
0.999
(c)
LM-BP based on original features
R
ST
SD
W
U
D
R
0.998
0
0
0.002
0
0
ST
0
0.998
0
0
0.002
0
SD
0
0
0.996
0.003
0
0.001
W
0
0
0
0.98
0.006
0.014
U
0
0
0
0.018
0.962
0.02
D
0
0
0.006
0.024
0.012
0.958
(d)
LM-BP based on KDA features
R
ST
SD
W
U
D
R
1
0
0
0
0
0
ST
0
1
0
0
0
0
SD
0
0
1
0
0
0
W
0
0
0
0.99
0.006
0.004
U
0
0
0
0.01
0.988
0.002
D
0
0
0
0.009
0.006
0.985
(e)
LS-SVM based on original features
R
ST
SD
W
U
D
R
0.993
0
0
0.006
0
0.001
ST
0
0.996
0
0
0.004
0
SD
0
0
0.997
0.001
0
0.002
W
0
0
0
0.981
0.006
0.013
U
0
0
0
0.01
0.976
0.014
D
0
0
0
0.02
0.012
0.968
(f)
LS-SVM based on KDA features
R
ST
SD
W
U
D
R
1
0
0
0
0
0
ST
0
1
0
0
0
0
SD
0
0
1
0
0
0
W
0
0
0
0.998
0
0.002
U
0
0
0
0.003
0.993
0.004
D
0
0
0
0.002
0.002
0.996Furthermore, 50 trials have been conducted for a thorough comparison study and the average results are outputted as the classification results as shown in Table2. The classifier of KDA based ELM takes the shortest testing time (0.0012 s) and achieves the highest testing accuracy (99.81%). Although KDA based ELM takes slight more training time than the original ELM, it has better classification result than the original ELM. That is because KDA can achieve the low intraclass variance and high cross class variance for activities and improve the classification accuracy effectively.Table 2
Classification results of ELM, LM-BP, and LS-SVM classifiers.
Features
Classifier
Time (s)
Accuracy rate (%)
Training
Testing
Training
Testing
Original
ELM
0.0022
0.0031
96.44
96.07
KDA based
ELM
0.0031
0.0012
99.96
99.81
Original
LM-BP
1.8985
0.0175
95.59
95.24
KDA based
LM-BP
0.8861
0.0246
98.48
98.02
Original
LS-SVM
0.7775
0.1819
97.36
95.97
KDA based
LS-SVM
0.7678
0.2760
99.94
99.05As shown in Table2, KDA based LM-BP can classify samples faster than the original LM-BP and has higher classification accuracy. Also KDA based LS-SVM can improve the accuracy. We can find that the KDA strategy is useful in improving the recognition performance.Now we give the comparison among ELM, BP, and SVM classifiers. It can be found from Table2 that the classification accuracy of ELM, LM-BP, and LS-SVM based on the original features is not significantly different, but ELM has much faster learning speed (up to hundreds times) than LM-BP and LS-SVM. Based on the KDA implementation, ELM and LS-SVM can achieve better classification performance than LM-BP, but LS-SVM needs longer time for training than ELM. Also, the parameters of LS-SVM and LM-BP need to be determined before training, while ELM selects parameters randomly before training. Overall, the experiments demonstrate that ELM can achieve superior recognition performance compared with the LM-BP and LS-SVM classifiers.


## 4. Conclusion

This paper develops a highly efficient approach for human activity recognition based on ELM and using only one triaxial accelerometer. A number of features, respectively, in the time domain, the frequency domain, and the time-frequency domain, are defined and extracted from the raw measurement signals. KDA is performed on the original features to achieve the low intraclass variance and high cross class variance for activities. ELM classifier is proposed to classify the activities. Experimental results show that KDA based classifier can improve the classification accuracy effectively and ELM can achieve superior recognition performance compared with SVM and BP classifiers.Further research is required to determine the most appropriate feature set for more specific subject groups, such as the elderly or the neurologically impaired. In the future, we would also like to examine more complex physical activities and apply the ELM algorithm to solve more complex classification problems.



---

*Source: 790412-2015-05-27.xml*