OCEAN: A new opportunistic
computing model for wearable activity
recognition
Yiqiang Chen1,2, Yang Gu1,2,3, Xinlong Jiang1,2,3, Jindong

Abstract

Wang1,2,3

Activities of Daily Living (ADL) recognition throughwearable devices is an emerging research field. While,for many applications, recognition methods are facedwith simultaneously dynamic changes in feature
dimension, activity class and data distribution. Existing
approaches mainly handle at most one of these threechallenges, which significantly affects theirperformance. In this paper, we propose an
Opportunistic Computing model for wEarable Activity
recognitioN (OCEAN); by fusing random mapping, fuzzyclustering, and weight updating techniques, OCEAN canonline adaptively adjust Single-hidden Layer
Feedforward neural network’s connection, structure andweight in a coherent manner. Experimental evaluations
demonstrate that OCEAN improves the recognition
accuracy by 5% to 15% compared to traditional
approaches towards dynamic changes.

1

Institute of Computing Technology, Chinese Academy of2

Beijing Key Laboratory of Mobile Computing and Pervasive

3

University of Chinese Academy of Sciences, Beijing, China

Sciences, Beijing, China
Device, Beijing, China{yqchen, guyang, jiangxinlong, wangjindong }@ict.ac.cn

Permission to make digital or hard copies of part or all of this work forpersonal or classroom use is granted without fee provided that copies are
not made or distributed for profit or commercial advantage and that
copies bear this notice and the full citation on the first page. Copyrights
for third-party components of this work must be honored. For all otheruses, contact the Owner/Author.
Copyright is held by the owner/author(s).
UbiComp/ISWC'16 Adjunct, September 12-16, 2016, Heidelberg,
Germany
ACM 978-1-4503-4462-3/16/09.
http://dx.doi.org/10.1145/2968219.2971453.

Author Keywords
Activity recognition; online learning; opportunisticcomputing; neural network.

ACM Classification Keywords
H.5.m. Information Systems: Information interfaces
and presentation: Miscellaneous.

Introduction
The rapid development of computing chip and hardware
has facilitated the proliferation of sensors and wearabledevices. And the ubiquity of smart wearable devices
has changed people’s life in many aspects, especially inActivities of Daily Living (ADL) recognition.
Currently, mainstream approaches for ADL recognition
are adopting fixed model (batch learning) [1] torecognize pre-defined activities [2]. However, when
dynamic changes occur in real situations, such asopportunistic sensors, undefined activities, anddifferent users, performance of fixed model
deteriorates. Though, existing online learning methods
can utilize existing model and newly arrived data toefficiently generate a new model, it can only handle
certain change, cannot learn or be self-adaptive whenfeature dimension, activity class and user style change
simultaneously [3-5], which always occurs in realsituations. Hence, in this paper, we propose a new
online learning method, Opportunistic Computing model
for wEarable Activity recognitioN (OCEAN), which
integrates random mapping, fuzzy clustering, andweight updating to form a dynamic learning neuralnetwork, so as to accomplish high recognition accuracy
towards dynamic changes simultaneously.
Figure 1. Framework of OCEAN

Methodology
The framework of proposed OCEAN is illustrated in
Figure 1. To train an initial model, there are 𝑁" arbitrary
distinct samples 𝑥$ , 𝑡$ ∈ ℜ) ×ℜ+ ,i = 1,2, … , 𝑁" . Here, 𝑥$ is
a 𝑛×1 input vector 𝑥$ = 𝑥$2 , 𝑥$3 , … , 𝑥$) 4 and 𝑡$ is a 𝑚×1
target vector 𝑡$ = 𝑡$2 , 𝑡$3 , … , 𝑡$+ 4 . When 𝑁2 incremental
88data (𝑥$7 , 𝑡$7 ∈ ℜ) ×ℜ+ arrive to update the model, where
7777 4 7
777
4𝑥$ = 𝑥$2 , 𝑥$3 , … , 𝑥$)7 ,𝑡$ = 𝑡$2, 𝑡$3, … , 𝑡$+7
. If 𝑛7 > 𝑛, whichmeans feature dimension is changed, then random

mapping technique is adopted; similarly; if 𝑚7 > 𝑚,which indicates activity class is changed, then fuzzyclustering techniques is adopted; and when different
user styles lead to the change of data distribution,weight updating technique is adopted.
Random mapping
Existing network cannot work well when feature
dimension changes. However, we can handle this issue
by random mapping technique according to [3], which
randomly generates connection between input layer
and hidden layer to deal with various feature
dimension. Assuming 𝑛7 > 𝑛, which implies feature
dimension is added, then we bring in an input weighttransfer matrix P, and a weight supplement vector 𝑄$ toadapt to the new connection, which is 𝑎$7 = 𝑎$ ∙ 𝑃 +𝑄$ @$?2 , where 𝑎$ is the weight connection between input
nodes and hidden nodes, 𝑎$7 is the new weight
connection. For matrix P, if 𝑃$A = 1, it means after thechanging, the 𝑖 CD dimension of original feature becomes
the 𝑗 CD dimension of new feature. 𝑄$ supplements thecorresponding input weight for the new adding
features. To make it clear, if the feature of original
training data is F2, F3 , and feature of incremental data
is F2 , F3 , FG, , FH , then we can generate matrix P and 𝑄$ tosolve the changing feature dimension problem, where
1 0 0 0
𝑃=,Q = 0, 0, Q G , Q H ; and Q G , Q H can be
0 1 0 0 L
generated randomly without time-consuming finetuning.
Fuzzy clusteringWith time passing by, user may have some newactivities which are not included in the existing model.
If we adopt old model to classify new activities, which
would be wrongly classified to one of existing classes.

In order to maintain the performance of recognition
model, we put forward fuzzy clustering technique,which can discover new activity classes throughprobability based clustering with unlabeled data, andthen update the model with new activity classes. Fuzzyclustering technique has four steps [4]: 1) Feature
extraction—extracting features from incremental data
(mostly unlabeled) of different sensors. 2) Outlier
detection—adopting one-class classification algorithm
to isolate and accumulate initially unknown but
increasingly distinguishable data; 3) Fuzzy clustering—
discovering new cluster candidates using fuzzyclustering algorithm; 4) Class-incremental update—
updating existing model with increasing classes.
Figure 2. Results for changing
feature dimension

Figure 3. Results for changing
data distribution

Weight updating
Different users have personalized wearable styles andactivity styles, which leads to inconsistent data
distribution for the same activity. Traditional learning
methods assume that data distribution maintains thesame; when data distribution changes, performancedecreases. Here, we use weight updating technique tosolve data distribution problem. According to [5], therelationship for new model, existing model andincremental data satisfies: β()NO) = β(QRS) + ∆β 𝑥 ∗ . Whenthe distribution of incremental data and existing data
are different, a suitable penalty ω to ∆β 𝑥 ∗ is broughtin, so that new model can balance the contribution
between incremental data and existing model toimprove the performance. The penalty ω is adaptively
calculated by the central tendency and dispersion
characteristics of incremental data [5].

Experiments
In order to test the performance of the proposed
OCEAN, we select a behavior recognition dataset from

HASC Challenge 2012 [6] which has 31844 data. The
dataset uses 3-axis accelerometer and 3-axisgyroscope
to identify six different behaviors: stay (Label 1), walk(Label 2), jog (Label 3), upstairs (Label 4), downstairs(Label 5), and skip (Label 6).
Firstly, we validate the performance when feature
dimension changes. Here are two situations: for test-1,14-dimension features of training data are extracted
from 3-axis accelerometer, while incremental data andtesting data add another 14-dimension features
extracted from 3-axis gyroscope; for test-2, 14dimension features of training data are extracted from
3-axis gyroscope, while incremental data and testingdata add another 14-dimension features extracted from
3-axis accelerometer. Three methods are compared inFigure 2: 1) RNM means retraining a new model; 2)
MOM means maintaining the old model; and 3) OCEAN
indicates updating the old model to fit the new feature
dimension with incremental data. Results show that for
both test-1 and test-2, OCEAN has the highest
accuracy. Compared with other methods, OCEAN not
only maintains the knowledge of old model, but alsotakes use of new incremental features to improveaccuracy.
Then, we validate the performance when activity classchanges. Four activities are chosen as known classes
and the rest two activities are unknown classes. We
mainly compare the performance of OCEAN with ELM[7] for its fast speed and without fine tuning which issuitable for wearable computing. Firstly, batch learning
ELM and online learning OCEAN have the same initialrecognition accuracy (83.00% on average). Whenunknown classes appear, accuracy of batch learning
degenerates greatly. Specifically, the average accuracy

of batch-mode ELM is 66.90% for one new class, andaccuracy declines to 55.66% (ELM) for two newclasses. While the corresponding accuracy for OCEAN is
71.00% and 76.2% respectively.
Then, we validate the performance when data
distribution changes. Here, we mainly compare OCEAN
with batch learning ELM and online learning methods
OSELM [8], COSELM [9], TOSELM [5]. The recognition
performance is shown in Figure 3. In Figure 3, ELM andOSELM cannot handle the changing of data. And, theother three methods have similar better accuracy thanELM and OSELM.
Table 1. Result (77.33%) for
OCEAN when changes occur
simultaneously

Table 2. Result (60.87%) for batchlearning ELM when changes occur
simultaneously

Finally, when feature dimension, activity class and data
distribution change simultaneously, the result of
proposed OCEAN is given in Table 1. We first utilize
random mapping to solve the feature dimension
changing from 14 to 28, then use fuzzy clustering todiscover two new activity classes (Label 2 and Label 5),
finally adopt weight updating technique to handle theinconformity of data distribution. Results show that
OCEAN not only maintains the knowledge from the oldmodel, but also learns new knowledge from incremental
data towards changes, it can achieve 77.33% accuracy
on average. In comparison, even if we utilize all the 28dimension features for batch leaning ELM (Table 2), as
it cannot deal with the changing activity class or data
distribution, its accuracy is 60.87% on average.

Conclusion
In this work, we propose an online leaning scheme foractivity recognition which works well under dynamicchanges in feature dimension, activity class and data
distribution simultaneously. Compared with traditionalonline learning method, it is more flexible. Experiments

based on open dataset demonstrate the effectivenessand robustness of proposed method.

Acknowledgement
This work was supported by Natural Science Foundationof China (No.61572471) and National Key Research andDevelopment Plan (No.2016YFB1001200).

References
1.

Thomaz E, et al. A practical approach forrecognizing eating moments with wrist-mounted
inertial sensing. UbiComp, 2015: 1029-1040.

2.

Khan A, et al. Beyond activity recognition: skill
assessment from accelerometer data. UbiComp,
2015: 1155-1166.

3.

Jiang X, et al. Feature adaptive online sequential
extreme learning machine for lifelong indoor
localization. Neural Computing and Applications,2016, 27(1): 215-225.

4.

Chen Z, et al. ContextSense: unobtrusive discovery
of incremental social context using dynamic
bluetooth data. UbiComp, 2014: 23-26.

5.

Gu Y, et al. TOSELM: timeliness online sequential
extreme learning machine. Neurocomputing, 2014,
128: 119-127.

6.

Kawaguchi N, et al. Hasc2012corpus: Large scale
human activity corpus and its application. IPSN,
2012, 12.

7.

Huang G, et al. Extreme Learning Machine: Theoryand Applications. Neurocomputing,2006: 489–501.

8.

Liang N Y, et al. A fast and accurate online
sequential learning algorithm for feedforward
networks. Neural Networks, 2006, 17(6): 14111423.

9.

Gu Y, et al. Constraint online sequential extreme
learning machine for lifelong indoor localization
system. IJCNN), 2014: 732-738.