Upload
hafizah
View
214
Download
1
Embed Size (px)
Citation preview
On the Use of Decision Tree for Posture Recognition
Nooritawati Md Tahir Faculty of Electrical Engineering,
Universiti Teknologi Mara (UiTM),
40450 Shah Alam Selangor DE Malaysia.
Aini Hussain, Salina Abdul Samad,
Hafizah Hussin Dept of Electrical Electronics and System,
Faculty of Engineering and Building Environment,
Universiti Kebangsaan Malaysia
43600 Bangi, Selangor DE, Malaysia.
Abstract-The aim of this study is to evaluate the
effectiveness of decision tree as classifier for recognition of four
main human postures (standing, sitting, bending and lying)
since decision trees are well known for their success for
prediction, recognition and classification task in data mining
problems. Firstly, the eigenfeatures of these postures are
optimized via Principal Component Analysis rules of thumb
specifically the KG-rule, Cumulative Variance and the Scree
Test. Next, these eigenfeatures are statistically analyzed prior
to classification. In doing so, the most relevant eigenfeatures
that we termed as eigenpostures can be ascertained. Further,
we employed decision tree as classifier for posture recognition.
Initial results of the experiments are encouraging which
suggested that our method can efficiently be applied for
posture classification using DT.
Keywords-Decision Tree, Posture Recognition, Principal
Component Analysis, ANOVA
I. INTRODUCTION
As we know, pattern recognition is an integral part in
most machine intelligence systems built for decision making
tasks such as computer vision, biometric, document
classification and bioinformatics. The process of pattern
recognition can be divided into three principal steps namely
data acquisition, feature extraction and classification.
Classification is a major role in machine learning as well as
knowledge-based system, is the task of assigning objects to
one of several predefined categories or classes and Decision
Tree (DT) is among the classification technique that is
widely used. DT is a classifier in the form of tree structure
where each node is either a leaf node to indicate the value of
the target attribute or category of examples or a decision
node to specify some test to be carried out on a single
attribute-value with one branch and sub tree for each
possible outcome of the test. Selection of which attribute
should be primarily tested is based on the highest
information gain attained followed by recursive procedure.
The attractiveness of DT is it represents ‘rules’. Rules can
readily be expressed for ease understanding of human.
Some related work based on DT is by Yuan et al. [1] that
evaluated the performance of the classification of gene
sequence data using DT and SVM. Experiments conducted
proven that DT performed well as or close to SVM and even
better in some cases. Next, Lobato et al [2] have proved the
great versatility of DTs for real world applications
specifically to predict stochastic residual demand curves in
the Spanish electricity market, to estimate the daily load
pattern of units and to predict the values of reactors and
capacitors of the Spanish power system. Further, Li et al. [3]
utilized the heuristic information of decision tree for
improving its generalization capability. Conversely, Tsang
et al. [4] extended the model of DT classification to
accommodate data tuples having numerical attributes with
uncertainty described by arbitrary pdf’s. Results attained
showed that exploiting data uncertainty leads to DTs with
remarkably higher accuracies. Besides that, Kołakowska [5]
experimented DT for recognition of printed musical
symbols. Initial findings showed that recognition based on
DTs obtained higher accuracy than those based on
morphology and template matching implemented in Guido
system. Therefore, in this study we deemed further to
evaluate DT based on the algorithm known as Classification
and Regression Trees (CART) by Breiman et al. [6][7] for
posture recognition.
The structure of this paper is as follows. Section II
discusses the methodology, section III consists of results
and discussion and finally in section IV concludes our
findings.
II. METHODOLOGY
A. Overview of System.
An overview of the overall system that outlines the basic
structure is as depicted in Figure 1. It consists of the
following steps; pre-processing, feature extraction, feature
selection based on the rules of thumbs of Principal
Component Analysis (PCA) followed by statistical analysis
via ANOVA prior to classification. In the pre-processing
stage, silhouette of the subject is extracted based on
background subtraction and thresholding. Background
subtraction of image is differentiation between the present
frame image which contains the subject of interest and the
reference images. In this study, the background subtraction
technique used is as mentioned in [12]. Firstly, based on
motion of object, silhouette will be extracted from each of
the video sequence images. Next, morphological operations
namely dilation and erosion are employed. Both of these
2010 International Conference on Intelligent Systems, Modelling and Simulation
978-0-7695-3973-7/10 $26.00 © 2010 IEEE
DOI 10.1109/ISMS.2010.47
209
2010 International Conference on Intelligent Systems, Modelling and Simulation
978-0-7695-3973-7/10 $26.00 © 2010 IEEE
DOI 10.1109/ISMS.2010.47
209
operations can be manipulated using single or combination
of specific structuring elements. To eliminate all unwanted
noise, median filtering and morphological operations are
utilized. The main purpose of this step is to filter the
presence of noisy pixels in the foreground image. Further,
based on PCA and the three rules of thumbs of PCA, the
feature extraction phase is employed. It is a well-known fact
that the major goal for using PCA is to replace the p-
dimensional feature space with a much smaller m-
dimensional feature space, which nevertheless discards little
information.
For most empirical data, a large part of the total
variance can be sufficiently approximated with the first few
principal components only. However, the actual number of
principal components needed remains obscure. Therefore,
the three rules of thumb have been proposed for feature
selection as listed below:
i) Kaiser Gutman (KG) rule - The KG rule states that
any PC with a variance of less than one contain less
information than the original variables and is
therefore not worth retaining. In other words, the
KG-rule retains only those PCs whose variances, i.e.
eigenvalues that are ≥ 1. Nevertheless, for large
variable spaces p, the KG-rule usually retains too
many PCs [8] [9].
ii) Cumulative Variance - The criterion for choosing m
is to select a cumulative variance threshold, t where t
is at certain percentage of the total variance that the
first m PCs should account for. The required number
of PCs is then the smallest value of m for which the
chosen percentage is exceeded [9]. From PCA theory,
the variance of the i-th PC (eigenvector) is equal to
its corresponding eigenvalues λi. The accepted range
of percentage is within 80% and above [9].
iii) Scree Test involves looking at the plot of the
eigenvalues λi against the factor number k. The Scree
Test involves a certain degree of subjectivity since
there is no formal numerical cut-off based on the λi. If
the eigenvalues are plotted, they form a curve
heading towards almost 0% variance explained by the
last dimension. Thus, the point at which the curve
levels-out, sometimes referred to as the ‘elbow’
indicates the number of useful PCs, which are present
in the data [9].
Based on these three rules of thumbs, the significant
features which known as 'eigenpostures' are the eigenvectors
(principal components) of the set of posture images. Detail
description of the eigenpostures approach can be found in
[10] [11]. These eigenpostures will undergo the first stage of
feature selection process according to the three rules of
thumb mention above. Next, we will deem further by
applying ANOVA to these eigenpostures. As we know,
ANOVA is a technique for measuring the statistical
significance of a set of independent variables. The measure
that ANOVA produces is the p-value for the feature set. In
doing so, the groups that differ significantly are revealed. In
doing so, the optimized number of eigenpostures will be
determined for classification of the four main postures. Both
categories of eigenpostures will be classified using ANN
and DT.
B. Decision Tree (DT) Classifier
As mentioned, DT is a classifier in the form of a tree
structure, where each node is either a leaf node or a decision
node. The former indicates a class of instances while the
Figure 1: Overview of the overall system
Outcome:
Lying/Bending/Sitting/Standing
Raw Image
• Background Sub
• Thresholding &
Morph operations
Pre processing
• ANN & DT
Classifier
Classification
Feature Extraction
Generation of eigenpostures
based on PCA
• Phase I – 3 Rules of
Thumb of PCA
• Phase II – Statistical
Analysis
Feature Selection
210210
latter specifies some test to be carried out on a single
attribute-value, with one branch and sub-tree for each
possible outcome of the test. A DT can be used to classify
an example by starting at the root of the tree and moving
through it until a leaf node, which provides the classification
of the instance. CART is used in this study. CART generally
attempts to predict the values of a continuous variable from
one or more continuous and/or categorical predictor
variables. The splitting process is performed by choosing the
threshold value. It minimizes the impurity measure and used
as a splitting criterion. The CART algorithm uses the Gini
index to measure the class diversity in the nodes of the DT [6]
and produces four categorical outcomes. To be specific, the
categories of postures are standing, sitting, bending and lying
position. The effectiveness of DT in our classification task
will be evaluated.
C. ANN Classifier
ANN is a popular heuristic technique that can deal with
complex non linear problem even if the problem is
extremely complex to be translated in analytical form. It
deals with the training and testing processes before a
network can be precisely developed to perform the desired
task. The most exhaustive task in ANN is the training
process that requires numerous training patterns with
informative features or variables. Hence, feature extraction
and selection can be utilized to attain the most informative
variables that will speed up the convergence process.
III. EXPERIMENTS AND RESULTS
In this study, the aim is to evaluate and confirm the
capability of DT to classify eigenpostures that have
experienced the feature extraction and feature selection
phases. The generated eigenpostures are based on the
database of 800 images of various human postures that
include both standing and non-standing positions, bending
and lying with the human subjects are either facing front or
side with no restriction impose on the type of clothing being
worn. Firstly, each image has m x n pixels, and then
reshaped to a column vector of 1 x mn. Next, the
eigenvectors and eigenvalues are computed according to
Tahir et al. [11]. Further, the three rules of thumb of PCA
are implemented and hence the most suitable eigenpostures
can be ascertained.
Table 1 tabulated the results upon implementation of
KG rule, Cummulative Variance and Scree Test
respectively. Firstly, applying KG rule suggested that
retaining all eigenvalues > 1 results in thirty-five PCs to be
considered as significant components. Next, the cumulative
variance rule of thumb acted as feature selection to
determine the optimum number of eigenpostures or PCs.
From Table 1, the overall cumulative variance of the
eigenpostures is shown. As suggested in [9], a threshold t of
between 80%-90% can be considered to determine factor
n
TABLE 1
The Significant Eigenpostures Using The KG Rule,
Cummulative Variance And Scree Test
Factor k
KG Rule
Cumulative
Variance
Scree
Test
1 44.37 19.059 19.059
2 23.64 29.289 10.229
3 17.48 36.792 7.5032
4 12.25 42.074 5.2822
5 10.32 46.591 4.5166
6 9.37 50.671 4.08
7 5.77 53.214 2.5429
8 5.64 55.688 2.4741
9 5.21 58.015 2.3272
10 3.89 59.713 1.6985
11 3.79 61.388 1.6749
12 3.17 62.814 1.4258
13 3.07 64.177 1.3629
14 2.90 65.465 1.2879
15 2.64 66.673 1.2079
16 2.60 67.857 1.1841
17 2.48 69.01 1.1528
18 2.39 70.105 1.0947
19 2.19 71.099 0.99471
20 2.02 72.045 0.94541
21 1.97 72.949 0.90395
22 1.77 73.772 0.82319
23 1.71 74.571 0.79945
24 1.67 75.312 0.74046
25 1.63 76.038 0.72617
26 1.57 76.73 0.69188
27 1.42 77.358 0.62865
28 1.35 77.977 0.6185
29 1.28 78.551 0.57428
30 1.26 79.121 0.56953
31 1.20 79.676 0.55543
32 1.14 79.702 0.52608
33 1.11 79.79 0.52042
34 1.06 80.21 0.52036
35 1.01 81.678 0.52025
36 0.984 82.142 0.5017
37 0.982 82.593 0.45103
38 0.981 83.02 0.42684
39 0.981 83.436 0.41549
40 0.980 83.837 0.40115
Note: Italic Values Indicate the optimized eigenpostures
subsequent to statistical analysis
211211
number, k. In this case, an 80% criterion would result in k
equals 34 as tabulated in Table 1. Finally, the Scree test
outcome in Table 1 illustrated the decrease in magnitude for
successive eigenvalues implies that the first few principal
components can approximate a large part of the original
data’s variance. In this case, decision to retain the first
thirty-five PCs is appropriate and they reasonably well to
represent good approximation of the original data set. These
eigenpostures are known as Type I and further undergo the
statistical analysis prior to classification. Accordingly, the
statistical significance of all Type I eigenpostures of the four
main postures is determined via ANOVA. Hence, from the
ANOVA test, at a significant level of α = 0.05, the outcome
for p-values of eigenpostures 1-9, 11-13, 15-18, and 20-22
are numerically indistinguishable from zero. As a result, the
ANOVA test has lucratively reduced the feature vectors to
nineteen or 54% of the initial feature extraction quantity and
these eigenpostures are known as Type II eigenpostures.
As aforementioned, ANN along with DT was chosen as
classifiers in this study. A three-layer NN with weights
adjusted using the Levenberg-Marquardt was trained to
determine the relationship between the selected
eigenpostures and the respective four posture classes namely
standing (ST), sitting (SI), bending (BD) and lying (LY).
Table 2 tabulated the classification result of Type I and
Type II with ANN and DT as classifiers. It is observed that
lying postures gained 100% accuracy rate for both
categories of eigenpostures for ANN as well as DT. This is
due to the nature of lying position that is extremely distinct
as compared to the other three postures.
Further, for the bending posture, the recognition rate
attained by Type II eigenpostures is higher than Type I
specifically 98% as compared to 94% for ANN. As for the
DT, both type of eigenpostures attained equal recognition
rate specifically 98%. Further, for sitting posture, both
categories achieved equal recognition rate that is 98% for
ANN but for DT, Type II eigenpostures obtained better
accuracy. For the standing posture, both classifiers attained
equal classification rate namely 98%. On the whole, for
ANN as classifier, Type II eigenpostures obtained average
recognition rate of 98.5% for ANN as well as DT which is
higher than Type I eigenpostures. It is proven that DT is
capable to perform posture recognition effectively as ANN.
Figure 2 displays the CART generated based on both
Type I and II eigenpostures with 10 maximum tree depth for
classifying the four possible outcome that is standing (ST),
sitting (SI)’, bending (BD)’ and lying (LY). The CART
algorithm selects E1, E2, E3, E4, E5, E6 and E11 as the seven
main attributes and picks E1 as the top node in the
discrimination process. Beginning from the top node, the
rule of ‘E1 < 0.014’ classifies the test image attribute
accordingly into any one of the fifteen possible leaf nodes.
If the top rule is satisfied, the decision takes the left path or
vice versa. The posture category that is bracketed in italic
form ‘(ST)’; is the recognition category if that specific level
tree depth is selected. Ultimately, a decision is reached
when a leaf node assigned the test image or observation as
either ‘ST’, ‘SI’, ’BD’, or ’ LY’. One interesting fact noted
is that from Figure 2, the DT selected the seven top
attributes for construction of the tree prior to statistical
analysis.
TABLE 2
CONFUSION MATRIX FOR POSTURE RECOGNITION BASED ON ANN and DT
PREDICTED CATEGORY
Type I Eigenpostures
(35 eigenpostures)
Type II Eigenpostures
(19 eigenpostures)
ANN DT ANN DT
ACTUAL
CATEGORY
BD SI ST LY BD SI ST LY BD SI ST LY BD SI ST LY
BD 188 4 8 0 196 2 2 0 196 0 4 0 196 0 4 0
SI 0 196 4 0 2 194 4 0 4 196 0 0 4 196 0 0
ST 4 0 196 0 2 2 196 0 4 0 196 0 2 2 196 0
LY 0 0 0 200 0 0 0 200 0 0 0 200 0 0 0 200
Accuracy (%) 97.5 98.25 98.5 98.5
212212
Figure 2. The Decision Tree Generated for Posture Classification for Type I and Type II Eigenpostures
G
M
N
F E
K L
I
D
A
B H
C J
LY ST
LY ST ST ST
ST
ST
SI ST
ST
SI
ST
SI ST
Node A: E1 < 0.014 (ST)
Node B: E1 < - 0.273 (LY)
Node C: E2 < 0.233(LY)
Node D: E3 < -0.151 (ST)
Node E: E4 < 0.164(LY)
Node F: E2 < -0.178 (ST)
Node G: E1 < -0.11 (ST)
Node H: E4 < 0.122 (SI)
Node I: E3 < 0.097 (SI)
Node J: E11 < -0.086 (ST)
Node K: E6 < -0.242 (SI)
Node L: E5 < - 0.069 (ST)
Node M: E1 < 0.13(ST)
Node N: E < 0.155 (SI)
Type II
Type I
1 2 3 4 5 6 7 8 9 100
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Number of Tree Depths
Cla
ss
ific
ati
on
Ra
te (
x1
00
%)
Figure 3. The accuracy rates with different number of tree depths. The best performance is at maximum tree depth.
213213
Additionally, Figure 3 shows the relationship between the
classification rate and the number of tree depth used. The
best classification rate attained for Type I is 98.25% while
for Type II is 98.5% when all tree depths were utilized. At
level seven tree depth, the classification accuracies attained
reduced below 90% for both type of eigenpostures.
IV. CONCLUSION
In conclusion, this study has proven the ability of DT to
perform recognition of four main human postures as good as
ANN. From the constructed DT, the seven feature vectors of
eigenpostures are confirmed as the most suitable and
optimized in discriminating human postures with above
98% accuracy rate for both categories. This work could be
extended to a broad range of posture recognition for safety
measures, intruder’s alertness, and action recognition for
surveillance applications.
REFERENCES
[1] X. Yuan, X. Yuan, F. Yang, J. Peng and B.P. Buckles, “Gene
Expression Classification: Decision Trees vs. SVMs,” Proceedings of the Sixteenth International Florida Artificial Intelligence Research Society Conference, 2003, USA, pp 92-97.
[2] E. Lobato, A. Ugedo, L. Rouco, and F.M. Echavarren, “Decision Trees Applied to Spanish Power Systems Applications,” Proceedings
of 9th International Conference on Probabilistic Methods Applied to Power Systems KTH, Stockholm, Sweden - June 11-15, 2006.
[3] N. Li, L. Zhao, Ai-Xia Chen, Qing-Wu Meng and Guo-Fang Zhang, “A New Heuristic Of The Decision Tree Induction,” Proceedings Of The Eighth International Conference On Machine Learning And Cybernetics, Baoding, 12-15 July 2009.
[4] S. Tsang, B.Kao, Kevin Y. Yip, Wai-Shing Ho and S,D. Lee, “Decision Trees for Uncertain Data”, Proceedings of IEEE International Conference on Data Engineering, 2007.
[5] Agata Kołakowska, “Applying Decision Trees to the Recognition of Musical Symbols,” Proceedings of the 2008 1st International Conference on Information Technology, IT 2008, Gdansk, Poland, 2008.
[6] Breiman L., Friedman J.H., Olshen R.A. and Stone C.J., “Classification and Regression Tree,” Belmont, CA. Wadsworth International Group, 1984.
[7] Tom Mitchell, “Machine Learning”, McGraw Hill, 1997.
[8] Nooritawati Md Tahir, Aini Hussain, Salina Abdul Samad, Khairul Anuar Ishak and Rosmawati Abdul Halim. “Feature Selection for Classification Using Decision Tree” Proceeding of SCORed 2006, Malaysia. 2006, pp 99-102.
[9] IT Jolliffe. Principal Component Analysis, Springer Series, 2001.
[10] M Turk and A. Pentland. “Eigenfaces for Recognition”. Journal of Cognitive Neuroscience. 3(1): 71-86, 1991.
[11] Nooritawati Md Tahir, Aini Hussain, Salina Abdul Samad, Hafizah Husain and Mohd Marzuki Mustafa,“Eigenposture for Classification” Journal of Applied Sciences 6(2): 419-424, 2006.
[12] S. Sulaiman, A.Hussain, N. Md Tahir, S. A. Samad. ”Graphical User Interface (GUI) Development for Object Tracking System in Video Sequences,” World Applied Sciences Journal, 4(2), pp 244-259.
214214