min
s;b;f
1
2
w w þ C þ
X m þ
ijy i ¼1
f i þ C À
X m À
ijy i ¼À1
f i
subject to y i ðs Uðy i Þ þ bÞ ! 1 À f i ; f i ! 0; i ¼ 1; . . .; m :
ð3Þ
m þ (resp. m À ) the number of positive (resp. negative) instances in the initial
database ( m À þ m þ ¼ m). Solving the formulation dual of WSVM [17] gives a
decision function for classifying a test point y 2 R
p
f ðxÞ ¼ sgn
X m sv
i¼m
a i y i Kðx; x i Þ þ b
!
:
ð4Þ
We used the Gaussian kernel as follows: Kðx; yÞ ¼ exp À x À y
k
k
2 =2r
2
. Some
authors [17–19] have proposed adjusting different cost parameters to solve the
imbalanced problem. To extend Weighted SVM to the multi-class scenario in order to
deal with N classes (daily activities), we have shown in [20] that the cost of misclassifying a point from the small class should be heavier than the cost for errors on the
large class. They used different misclassification C i per class, use this conclusion can
get a satisfactory result. By taking C − = C i and C + = C, with m þ and m i be the number
of samples of majority classes and number of samples in the i
th class, the main ratio
cost value C i for each activity can be obtained by:
C i ¼ roundðC Â m þ =m i
½
Š Þ; i ¼ 1; . . .; N:
ð5Þ
2.4 Hidden Markov Model (HMM)
HMM [21] comprises two parts: Markov chain and stochastic process. Markov chain,
whose output is a sequence of state, can be described by the initial probability distribution for the states (p) and the state transition matrix (A), while stochastic process
whose output is a sequence of observed values, is described by the observation
probability matrix (B). Thus, a HMM can be described as:
A ¼ a ij ¼ Pðy t ¼ jjy tÀ1 ¼ iÞ and
X N
j¼1
a ij ¼ 1
ð6Þ
B ¼ b j O t
ð Þ
Â
Ã
ð7Þ
b j O t
ð Þ ¼ P q k þ 1 ¼ O t = q t ¼ i
ð
Þ
ð 8Þ
p ¼ ½p 1 ; p 2 . . .; p N Š
ð 9Þ
Human Activities Recognition in Android Smartphone Using WSVM-HMM Classifier
389
Précédent

- 393/446

Suivant