sensors Article

Analysis of Optimal Sensor Positions for Activity Classification and Application on a Different Data Collection Scenario Natthapon Pannurat 1 , Surapa Thiemjarus 2, *, Ekawit Nantajeewarawat 1 and Isara Anantavrasilp 3 1

2 3

*

School of Information, Computer, and Communication Technology, Sirindhorn International Institute of Technology, Thammasat University, Pathumthani 12000, Thailand; [email protected] (N.P.); [email protected] (E.N.) National Electronics and Computer Technology Center, Pathumthani 12120, Thailand International College, King Mongkut’s Institute of Technology Ladkrabang, Bangkok 10520, Thailand; [email protected] Correspondence: [email protected]; Tel.: +66-2-5646-900 (ext. 2479)

Academic Editors: Giancarlo Fortino, Hassan Ghasemzadeh, Wenfeng Li, Yin Zhang and Luca Benini Received: 11 January 2017; Accepted: 16 March 2017; Published: 5 April 2017

Abstract: This paper focuses on optimal sensor positioning for monitoring activities of daily living and investigates different combinations of features and models on different sensor positions, i.e., the side of the waist, front of the waist, chest, thigh, head, upper arm, wrist, and ankle. Nineteen features are extracted, and the feature importance is measured by using the Relief-F feature selection algorithm. Eight classification algorithms are evaluated on a dataset collected from young subjects and a dataset collected from elderly subjects, with two different experimental settings. To deal with different sampling rates, signals with a high data rate are down-sampled and a transformation matrix is used for aligning signals to the same coordinate system. The thigh, chest, side of the waist, and front of the waist are the best four sensor positions for the first dataset (young subjects), with average accuracy values greater than 96%. The best model obtained from the first dataset for the side of the waist is validated on the second dataset (elderly subjects). The most appropriate number of features for each sensor position is reported. The results provide a reference for building activity recognition models for different sensor positions, as well as for data acquired from different hardware platforms and subject groups. Keywords: activity classification; activity monitoring; wearable sensors; sensor positions

1. Introduction The Body Sensor Network (BSN) has recently been an emerging technology that provides a platform for pervasive healthcare monitoring [1]. The technology is believed to play an important part in improving the quality of life for elderly people and patients. In healthcare monitoring, wearable sensors have been employed for several applications including energy expenditure estimation [2–4] and analysis [5,6], fall detection [7], fall risk assessment [8], activities of daily living (ADLs) classification [9,10], motor rehabilitation [11], and cardiac monitoring [12]. Activity recognition is particularly useful in pervasive sensing systems. For fall monitoring, accurate activity classification can enhance the performance of fall detection algorithms [7]. Recognition of lying postures, e.g., supine, lying on the right side, prone, and lying on the left side, is useful for developing a system for preventing pressure ulcers [13]. Accelerometers and gyroscopes are widely used as wearable sensors for activity classification. In [14,15], seven activities, i.e., walking,

Sensors 2017, 17, 774; doi:10.3390/s17040774

www.mdpi.com/journal/sensors

Sensors 2017, 17, 774

2 of 16

sitting, standing, jogging, biking, walking upstairs, and walking downstairs, were classified using an accelerometer and a gyroscope. ADL classification using an accelerometer was reported to yield better performance than a gyroscope for all activities, except for walking upstairs and walking downstairs, and the overall recognition accuracy was not improved with the additional use of the gyroscope. Compared to a gyroscope, an accelerometer requires less power [16,17] and is thus a more suitable sensor as Sensors power constraint is one of the challenging issues in a BSN application. Other problems and 2017, 17, 774 2 of 16 requirements for the effective development of a BSN application can be found in [18]. classified using [19–21], an accelerometer andsensors a gyroscope. classification using an accelerometer was accuracy In several studies multiple haveADL been used either to improve detection reported to yield better performance than a gyroscope for all activities, except for walking upstairs and/or to find an optimal placement. Although higher classification accuracy has been reported and walking downstairs, and the overall recognition accuracy was not improved with the additional with the use of the multiple sensors [20],tomulti-sensor will introduce several research use of gyroscope. Compared a gyroscope, anfusion accelerometer requires less power [16,17] and challenges, is as discussed [22].suitable Taking usability into consideration, smaller number sensors is preferable. thus in a more sensor as power constraint is one of theachallenging issues in aof BSN application. Other requirements forofthe effective development of been a BSN examined application can be found studies. As depicted in problems Figure 1,and a large variety sensor positions have in previous in [18]. In order to find an optimal sensor position, Gjoreski et al. [19] placed tri-axial accelerometers on In several studies [19–21], multiple sensors have been used either to improve detection accuracy subject’s chest, thigh, and ankle. Several ADLs (e.g., lying,has sitting, standing, and/or waist, to find an optimal placement. Althoughtypes higherof classification accuracy been reported withsitting on the ground, down,[20], standing up, and allwill fours on the ground) andchallenges, falls (e.g., the sitting/lying use of multiple sensors multi-sensor fusion introduce several research as tripping, discussed in [22]. Taking usability into consideration, a smaller number of sensors is preferable. As falling slowly, falling from a chair slowly, and falling from a chair quickly) were classified using in Figure 1, a large variety of sensor positions have been examined in previous studies. In statisticaldepicted features, e.g., mean, root mean square, and standard deviation. With only one sensor, the order to find an optimal sensor position, Gjoreski et al. [19] placed tri-axial accelerometers on accuracy values of 75% andthigh, 77% and were achieved theofchest respectively. Atallah subject’s chest, waist, ankle. Several at types ADLs and (e.g., waist, lying, sitting, standing, sitting on et al. [21] investigated the optimal sensor positions tri-axial on different the ground, sitting/lying down, standingby up,placing and all fours on theaccelerometers ground) and falls (e.g., tripping, parts of falling slowly, falling fromselection a chair slowly, and fallingi.e., from a chairSimba, quickly)and wereminimum classified using subjects’ bodies. Three feature algorithms, Relief, redundancy statistical features, e.g., mean, root mean square, and standard deviation. With only one sensor, the maximum relevance (mRMR), were used for measuring feature importance. These algorithms gave accuracy values of 75% and 77% were achieved at the chest and waist, respectively. Atallah et al. [21] the same investigated four highest ranked features. With only four features, k nearest neighbor (kNN)yielded the optimal sensor positions by placing tri-axial accelerometers on different parts of reasonable resultsbodies. for distinguishing five levels of activities, very low, medium, subjects’ Three feature selection algorithms, i.e., Relief,i.e., Simba, andlow, minimum redundancyhigh, and maximum relevance (mRMR), were classification used for measuring feature importance. These algorithms transactional activities. In [20], an ADL experiment was conducted based ongave five tri-axial the same four highest ranked features. onlylower four features, k nearest neighbor (kNN)yielded accelerometers placed on the chest, waist,With thigh, back, and ankle. Eleven types of features reasonable results for distinguishing five levels of activities, i.e., very low, low, medium, high, and were used for classifying seven types of ADLs, i.e., lying, sitting, standing, walking, walking upstairs, transactional activities. In [20], an ADL classification experiment was conducted based on five walking downstairs, and jogging. algorithms, decision tree (J48), naïve tri-axial accelerometers placed Four on themachine-learning chest, waist, thigh, lower back, andi.e., ankle. Eleven types of Bayes (NB), neural network andseven support machine (SVM), were evaluated by using a features were used for(NN), classifying typesvector of ADLs, i.e., lying, sitting, standing, walking, walking upstairs, downstairs, and jogging. Four machine-learning algorithms, decision Waikato environment forwalking knowledge analysis (WEKA) Experimenter. With a singlei.e., sensor, J48 and NB tree (J48), naïve Bayes (NB), neural network (NN), and support vector machine (SVM), were yielded the best accuracy values when the sensor was placed on the ankle, while SVM appeared to evaluated by using a Waikato environment for knowledge analysis (WEKA) Experimenter. With a be the best classifier all NB other positions. Out of the four positions, as the single sensor, for J48 and yielded the best accuracy values when the sensorthe was waist placed was on thereported ankle, best singlewhile position, with antoaccuracy value of 97.81%. In some studies criteria SVM appeared be the best classifier for all other positions. Out of[23–25], the four other positions, the besides waist was reported as the best single consumption, position, with an and accuracy value of 97.81%. In some studies accuracy (e.g., computation cost, power sensor redundancy) are also considered other criteria besides accuracy (e.g., computation cost, power consumption, and sensor in the data[23–25], analysis step. The experiments in these studies involved multiple sensor nodes and were redundancy) are also considered in the data analysis step. The experiments in these studies involved beyond the scopesensor of this study. multiple nodes and were beyond the scope of this study. Head [42, 43]

Wrist [10, 30, 31, 34, 37, 40, 41]

Chest [32, 34–40] Upper arm [10, 42]

Waist [10, 26–34]

Thigh [10, 26, 35, 37, 41]

Leg [41] Ankle [31, 32, 34]

Figure 1. Different positions for sensor placement. Waist [10,26–34]; Chest [32,34–40]; Wrist

Figure 1. Different positions for sensor placement. Waist [10,26–34]; Chest [32,34–40]; [10,30,31,34,37,40,41]; Upper arm [10,42]; Head [42,43]; Thigh [10,26,35,37,41]; Leg [41]; Ankle Wrist [10,30,31,34,37,40,41]; Upper arm [10,42]; Head [42,43]; Thigh [10,26,35,37,41]; Leg [41]; [31,32,34]. Ankle [31,32,34].

Sensors 2017, 17, 774 Sensors 2017, 17, 774

3 of 16 3 of 16

Different studies focused on different types of ADLs, subject groups, hardware, and environment Evaluating an algorithm onADLs, a different group or hardware platform Differentsettings. studies focused on different types of subjectsubject groups, hardware, and environment usually involves collecting new data. Most of the time, the classification performances are not settings. Evaluating an algorithm on a different subject group or hardware platform usually thus involves directly However, it hasthe been learned from previousare studies thatdirectly a combination of collectingcomparable. new data. Most of the time, classification performances thus not comparable. features obtained from feature selection algorithms and different classification models can be used However, it has been learned from previous studies that a combination of features obtained from feature for discovering the appropriate models and features for classifying ADLs. The main of selection algorithms and different classification models can be used for discovering theobjectives appropriate this paper are twofold: models and features for classifying ADLs. The main objectives of this paper are twofold: 1. 1.

To investigate three different factors that affect ADL classification, i.e. sensor positions, To investigate three different factors that affect ADL classification, i.e. sensor positions, features, features, and classification models. and classification models. 2. To explore the possibility of applying a model trained from data collected in a different 2. experimental To explore the possibility of applying trained fromhardware). data collected in a different setting (e.g., a subject group,aamodel sampling rate, and experimental setting (e.g., a subject group, a sampling rate, and hardware). In this study, we focus on optimal sensor positioning for monitoring elderlies’ activities such as this study, we focus on optimal sensor positioning monitoring elderlies’ activitiessubjects) such as sleepInpostures, sitting, standing, and walking. Collecting for data from elderlies (vulnerable sleep postures, sitting,They standing, and walking. Collecting data from elderlies (vulnerable has has some limitations. are uncomfortable with performing certain activities and/or subjects) are not able some limitations. are uncomfortable with certain activities and/orfor areexample, not able to to perform certainThey activities for a long period ofperforming time. Walking upstairs/downstairs, is perform certain for aaslong period of time. Walking upstairs/downstairs, not not included inactivities this study, many of the elderlies would require assistance for to example, perform is these included in thistrading study, as many of the elderlies would to perform these activities and activities and the classification accuracy of require walkingassistance upstairs/downstairs for that of other trading the classification accuracy of walking upstairs/downstairs for thatTo ofaddress other activities would activities would not benefit a monitoring system for elderlies as a whole. the above two not benefit two a monitoring system elderlies as a whole. To address the above two objectives, two objectives, datasets are used.for The first dataset is collected from young subjects using tri-axial datasets are used. Theon first datasetbody is collected from young subjects using tri-axial accelerometers accelerometers placed different parts. The second dataset is collected from elderly subjects placedaon different body parts. The second dataset issampling collected rate. from By elderly using a different using different hardware platform and a different usingsubjects the data collected from young subjects, weand firsta different study various combinations of features and models different sensor hardware platform sampling rate. By using the data collected fromon young subjects, we positions analyze how theofthree factors (i.e., sensor positions, first study and various combinations features and models on different sensorfeatures, positionsand andclassification analyze how models) classification. The best model is then applied onclassification. the dataset the three affect factorsthe (i.e.,ADL sensor positions, features, andobtained classification models) affect the ADL collected from elderly subjects. The best obtained model is then applied on the dataset collected from elderly subjects. The paper is organized as follows; Section Section 22 describes describes the the datasets datasets used used in in our our experiments. experiments. Section 3 presents data analysis techniques. Section 4 reports the experimental results, and Section 5 concludes this paper. 2. Data Data Descriptions Descriptions 2. This study forfor deriving appropriate combinations of features and This study involves involvestwo twodatasets, datasets,i.e., i.e.,DS1 DS1 deriving appropriate combinations of features activity classification modelsmodels on different sensor positions DS2 forand assessing of and activity classification on different sensor and positions DS2 the for performance assessing the pre-trained models when applied to data obtained using another data collection scenario. Wireless performance of pre-trained models when applied to data obtained using another data collection ear-worn Wireless activity recognition (e-AR) recognition sensors [44] (e-AR) and a BSN node[44] [45]and developed by Imperial College scenario. ear-worn activity sensors a BSN node [45] developed were used for collecting and respectively. e-AR sensor usesAn a Nordic nRF24LU1P by Imperial College wereDS1 used forDS2, collecting DS1 andAn DS2, respectively. e-AR sensor uses a processor with an IEEE 802.15.4 (2.4 GHz) integrated radio transceiver. A BSN node is based on a TI Nordic nRF24LU1P processor with an IEEE 802.15.4 (2.4 GHz) integrated radio transceiver. A BSN MSP430F1611 and equipped processor with a separate radio transceiver CC2420, Chipcon node is based processor on a TI MSP430F1611 and equipped with a (Chipcon separate radio transceiver Co. Ltd., Oslo, Norway). Figure shows an e-AR sensor and a2BSN node theand coordinate (Chipcon CC2420, Chipcon Co. 2Ltd., Oslo, Norway). Figure shows analong e-ARwith sensor a BSN systems of their embedded tri-axial accelerometers. node along with the coordinate systems of their embedded tri-axial accelerometers. z

y

a)

y

x

x

z

b)

Figure 2. An ear-worn activity recognition (e-AR) sensor (a) and a Body Sensor Network (BSN) node Figure 2. An ear-worn activity recognition (e-AR) sensor (a) and a Body Sensor Network (BSN) node (b) along with their coordinate systems. (b) along with their coordinate systems.

Sensors 2017, 17, 774 Sensors Sensors 2017, 2017, 17, 17, 774 774

4 of 16 44 of of 16 16

The dataset datasetDS1 DS1was wascollected collected(using (using e-AR sensors) from 12 subjects (6 male 6 female), The e-AR sensors) from 12 subjects (6 male and 6and female), aged aged between Acceleration were sampled 15 transmitted Hz and transmitted to a between 23–45 23–45 years. years. Acceleration signalssignals were sampled at 15 Hzatand to a computer computer through a receiver board. As shown in Figure 3, the e-AR sensors were placed on eight through a receiver board. As shown in Figure 3, the e-AR sensors were placed on eight different body different body positions, (a) the side theupper head, arm, (b) the arm, (d) (c) the positions, i.e., (a) the sidei.e., of the head, (b)ofthe (c)upper the wrist, the wrist, ankle, (d) (e) the the ankle, chest, (e)the theside chest, side(g) of the the front waist,of(g) frontand of the andThe (h) the thigh. The twelve subjects (f) of (f) thethe waist, thethe waist, (h) waist, the thigh. twelve subjects were asked to were asked to perform a sequence of seven activities, i.e., (a) sitting on a chair, (b) supine, (c) lying perform a sequence of seven activities, i.e., (a) sitting on a chair, (b) supine, (c) lying on the left side, on prone, the left(e) side, (d)onprone, (e) side, lying(f)onstanding, the rightand side, standing, and (g) shown in (d) lying the right (g) (f) walking, as shown in walking, Figure 4. as Each subject Figure 4. Each performed each activity performed eachsubject activity for approximately 15 s.for approximately 15 s. a) a)

e) e)

b) b)

f) f)

c) c)

g) g)

d) d)

h) h)

Figure 3. Sensor placements. Figure 3. 3. Sensor Sensor placements. placements. Figure a) a)

b) b)

d) d)

e) e)

c) c)

f) f)

g) g)

Figure A young subject performing Figure 4. sequence of seven activities. Figure 4. 4. A A young young subject subject performing performing aaa sequence sequence of of seven seven activities. activities.

The dataset dataset DS2 DS2 was was collected collected (using (using aa BSN BSN node) node) from from 48 48 healthy healthy elderly elderly subjects subjects (20 (20 males males The and 28 28 females), females),with withan anaverage averageage age 67.52 years. Acceleration signals were sampled 50 The Hz. and of of 67.52 years. Acceleration signals were sampled at 50atHz. The subjects were asked to perform a routine of six activities, i.e., (a) sitting on a branch, (b) subjects were asked to perform a routine of six activities, i.e., (a) sitting on a branch, (b) standing, standing, (c)(d) walking, (e)the lying theand left (f) side, andon (f)the lying onside, the right side, (c) walking, supine,(d) (e)supine, lying on lefton side, lying right which are which shownare in shown 5,inwith Figure 5, with a tri-axial accelerometer attached towaist. the side of the waist. Figure a tri-axial accelerometer being attachedbeing only to the sideonly of the Compared to the Compared to the activities in DS1, prone excluded since it for was uncomfortable for activities considered in DS1,considered prone was excluded since was it was uncomfortable the elderly subjects. the elderly subjects.

Sensors 2017, 17, 774 Sensors 2017, 17, 774

5 of 16 5 of 16

a)

b)

c)

d)

e)

f)

Figure 5. 5. An elderly subject performing a sequence sequence of of six six activities. activities. Figure

The study was approved by the Ethical Committee for Human Research of the National The study was approved by the Ethical Committee for Human Research of the National Science Science and Technology Development Agency (NSTDA), Thailand (document number 0010/2558), and Technology Development Agency (NSTDA), Thailand (document number 0010/2558), and and informed consent was obtained from subjects prior to their participation. informed consent was obtained from subjects prior to their participation. 3. Data Data Analysis Analysis 3. 3.1. Feature Extraction Extraction 3.1. Prior to to feature feature extraction, extraction, data data preprocessing preprocessing isis required. required. For instance, to handle handle different different Prior sampling rates, acceleration signals with a high data rate were down-sampled. To cater for different different sampling device coordinate systems, a transformation matrix was used for aligning signals to the same device coordinate systems, a transformation matrix was used for aligning signals to the same coordinate coordinate system. dealin with noises signals, in acceleration a median technique was system. To deal with To noises acceleration a mediansignals, filter technique wasfilter employed. To cater employed. To cater inter-subject and hardware variations, signalsbywere normalized for inter-subject andfor hardware variations, acceleration signalsacceleration were normalized subtracting the by subtracting thesignals median values of signals acquiredTable during standing.the Table 1 describes features median values of acquired during standing. 1 describes features used inthe this study used in this along with the featureThe extraction functions. Theonfunctions aredata applied along with thestudy feature extraction functions. functions are applied normalized usingon a fix-sized window of 1 s,ashifted bywindow 0.5 s at each step.by 0.5 s at each time step. normalized data using fix-sized of 1 time s, shifted Table 1. 1. List List of of features features and and their their equations. equations. Table

Feature

Feature

Description

Description

Equation

Equation

N

N

Means x-,z-axes y-, and z-axes F1–F3 F1–F3 Means along x-, along y-, and

∑ xi

µ= s

N

N

F4–F6

F4–F6

Standard deviations along x-, y-, and z-axes

Standard deviations along x-, y-, and z-axes F7–F9

Maximum values along x-, y-, and z-axes

F7–F9 F10–F12 MaximumMinimum values along y-, x-, and valuex-, along y-,z-axes and z-axes F10–F12

MinimumDifferences value along x-, y-,maximum and z-axes between and

F13–F15

F13–F15

σ=

μ

i =1

∑ (x i −µ)

2

i =1

N

σ M = max(xi )

x i 1

N

N

 (x i 1

i

i

 μ)2

N M  max(x ) m = min(xi ) i

∆m = M − m

m  min(xi )

minimum along x-, y-,minimum and z-axes values along x-, y-, Differences betweenvalues maximum and q Δm  M  m and z-axesStandard deviation magnitude F16 |σ| = σ2x + σ2y + σ2z

F16 F17–F19 Standard deviation Correlationmagnitude between x-y, x-z, and y-z axes

r ab =

σab σ  σ a σb

σ 2x  σ 2y  σ 2z

σ σ aσ b

N = number of data samples; i = data sample index; xi = observation vector at i; σx , σy , σz are standard rdeviation  ab F17–F19 Correlation between x-y, x-z, and y-z axes ab values along the x-, y-, and z-axes, respectively; σ is the covariance between axes a and b. ab

N = number of data samples; i = data sample index; 𝐱 𝑖 = observation vector at i; 𝑥 , 𝑦 , 𝑧 are 3.2. Feature Selection standard deviation values along the x-, y-, and z-axes, respectively; σ ab is the covariance between axes a and b. to other approaches to feature selection, a feature ranking approach, in general, Compared requires lower computation complexity and entails a lower risk of overfitting [46]. In [21], three feature

Sensors 2017, 17, 774

6 of 16

selection algorithms were examined, i.e., Relief, Simba, and mRMR, and it was reported that these algorithms yielded similar feature importance, especially for the first four highest ranked features. Relief-F [47], which is an extended version of Relief [48], was reported as the best feature selection algorithm in [49] compared to Fast Correlation Based Filter and Correlation Based Feature Selection. It was one of the most widely used feature selection algorithms, with low computational time [50] and the ability to deal with incomplete and noisy data, and can be used for evaluating feature quality in multi-class problems [51]. In this study, Relief-F was used to determine the most appropriate feature sets. The algorithm ranks individual features according to feature relevance scores. It randomly selects an instance R and finds the nearest sample H from the same class and the nearest sample M from a different class. Given a feature A and its feature relevance score W[A], instead of looking for the nearest sample M from only one different class, Relief-F searches one M for each different class C and averages their contributions to updating W[A] by W [ A] = W [ A] −

∆( A( R), A( H )) [ P(C ) × ∆( A( R), A( M(C )))] + ∑ , n n c6=class( R)

where n is the number of instances used for approximating the probabilities; given a sample x, ∆(A(R), A(x)) is the difference between the value of the feature A of the instance R and the value of that of x; class(R) denotes the class to which R belongs; and M(C) and P(C) denote the nearest sample in the class C and the probability of the class C, respectively. 3.3. Classification Algorithms The following classification algorithms are used in this study.



• •





Bayesian network (BN) [52]: BN is a directed acyclic graphical model describing relationships between features and classes. Each node in a graph corresponds to a feature, and a directed edge between two nodes represents a causal relationship between them. By observing feature values and the class of each element in the set of data samples, one can construct such a network and use it to compute the probability of each class given an unseen sample. The class with the highest probability will be assigned to the sample. In our experiment, conditional probability tables are estimated by using a simple estimator, and network structures are learned from the data distribution by using the K2 search algorithm along with Bayesian scores. Naïve Bayes (NB) [53]: NB is a simple Bayes’ theorem-based probabilistic classifier with independent assumptions among features. Pruned decision tree (J48) [54]: J48 is a Java implementation of the C4.5 decision tree algorithm. C4.5 determines ‘information gain’ of each feature by comparing entropies of the data before and after considering the feature. C4.5 tries to construct a decision tree in which each node tests a feature value. Although the algorithm is proved to be very useful, features with many possible values could lead to overfitting. This problem could often be resolved by pruning some branches of the tree. Partial-tree rule learning (PART) [55]: PART uses the C4.5 decision algorithm to create a set of classification rules. However, unlike the ordinary C4.5, PART does not expand (or grow) a tree from the root to leaf nodes. It uses only a partially created tree that contains nodes with the lowest entropy to generate a set of rules. The instances covered by the created rules are then removed from the dataset. The process is repeated until all instances are covered. Instance-based learning [56]: Instead of building a classification model, an instance-based learning algorithm uses a set of given data as part of the classifier. The idea is built around an algorithm called k nearest neighbor (kNN). kNN treats each sample as a point in an M-dimensional space, where each dimension corresponds to one feature. It is assumed that elements of the same class should be close to each other (since they have similar properties, i.e. similar feature values).

Sensors 2017, 17, 774





7 of 16

To classify an unseen sample, kNN finds k nearest data samples (or ‘neighbors’) and assigns the majority class of those samples to it. Multi-layered perceptron [57]: Sometimes referred to as neural network (NN), the algorithm classifies data samples using a layered structure (network) of small processing units, i.e., perceptrons. A perceptron takes in multiple inputs and produces a single output using a simple calculation function. Each input is associated with a computational weight. To classify a data sample, perceptrons in the first layer consider feature values of the samples and forward the output results to those in the next layer. Each perceptron in a subsequent layer produces an output by considering the results obtained from all perceptrons in its previous layer along with their corresponding weights. The process is repeated until the last layer is reached. A class is assigned to an unseen data sample based on the results of the last layer. The network can be trained to adapt itself to solve specific problems by continually adjusting the weight of each input to each perceptron. Support vector machine (SVM) [58]: SVM is a supervised machine learning algorithm, which can be used for both classification or regression analysis. Its basic principle is to define decision boundaries between a set of objects having different class memberships by constructing hyper planes in a multidimensional space. In our experiment, SVM is trained by applying a sequential minimal optimization algorithm with a polynomial kernel being used as a support vector.

In our experiments, we set the number k of neighbors for instance-based learning to 1 and 3. The performance of the eight algorithms, i.e., BN, NB, J48, PART, 1NN, 3NN, NN, and SVM, are compared. The classification models were developed in Java using WEKA application program interface with their default parameters. 4. Results 4.1. Validation Using DS1 (Young Subjects) Table 2 shows the ranks of the 19 features obtained by applying the Relief-F feature selection algorithm to DS1. A smaller number indicates a better feature rank. The top two features used for all positions are the mean and the maximum values along the upward axis (F3 and F9). Considering the top four features, the maximum value along the x-axis (F7) and the minimum values along the upward axis (F12) are the next most commonly used features, followed by the mean along the x-axis (F1). The correlation across the three axes (F17, F18, and F19) are the three lowest ranked features for all sensor positions. Since the number of subjects in DS1 is 12, six-fold cross validation was used to evaluate the eight classification algorithms. For each fold, the models were trained based on the data acquired from ten subjects and evaluated on the data acquired from the two remaining unseen subjects. For each integer f such that 1 ≤ f ≤ 19, Figure 6 shows the average accuracy values of the eight classification algorithms across all sensor positions when the top f features for each sensor position were used. With only one feature, the accuracy values are relatively low for all sensor positions. The values can be improved by increasing the number of features. As there is no significant improvement on classification accuracy with further additional features, five to seven features are considered to be appropriate. The accuracy values of different classification algorithms across the eight sensor positions are shown in Figure 7. Table 3 summarizes the model settings with the best classification accuracy across the different sensor positions. The thigh yields the highest accuracy value of 99%, using 1NN with five features. NB is the best model for the side of the waist, front of the waist, chest, head, and ankle, with accuracy values of 98.34%, 96.45%, 98.50%, 86.38%, and 90.70%, respectively. 3NN and NN are the best models for the upper arm and wrist, with accuracy values of 80.83% and 80.60%, respectively.

Sensors 2017, 17, 774 Sensors 2017, 17, 774

8 of 16 8 of 16

Sensors 2017, 17, 774

Position Position Position

8 of 16

Table2.2.The Thefeature feature rankings rankings obtained Table obtained from fromRelief-F Relief-Fon onDataset Dataset1 1(DS1). (DS1). Table 2. The feature rankings obtained from Relief-F on Dataset 1 (DS1). Feature Ranks 1

2

3

4

5

6

7

Ankle

F9

F3

F1 F12 F7

Feature Ranks

8 Feature 9 10Ranks 11 10 F16 F4 10 11 11 F16 F16 F6 F16 F4 F4 F16 F14 F5 F16 F6 F6 F14 F5 F16 F4 F14 F5 F16 F4 F6 F15 F16 F4 F6 F15 F16 F6 F6 F15 F16 F6 F16 F6 F16 F6 F16 F16 F6 F6 F2 F10 F11 F8 F16 F6

Side waist 1 F3 1 2 F9 2 3 F7 3 4F10 4 5 F1 5 6F11 6 7F2 7 Side waist Front waist F9 F1F12 F11 F10 Side waist F3 F3 F3F9 F7 F9F7 F1 F7F10 F10 F1 F11 F11 F2 F2 Front waist Chest F2 F11 F12 F7 Front waist F3 F3 F3F7 F9 F7F1 F8 F1 F9F11 F9 F12 F12 F11 F10 F10 Chest F3 F9 F8 F11 F2 F12 Thigh F9 F7 F2 F8 F7 F11 Chest F3 F3 F9 F1 F8 F11 F2 F12 F7 Thigh F9 F3 F1 F7 F2 F8 F11 Head F3 F9 F12 F2 F7 F8 F11 Thigh F9 F3 F1 F7 F2 F8 Head F3 F9 F12 F2 F7 F8 F11 Upper arm F3 F3 F12 F11 F1 Head F3F9 F9 F9F12 F12F2F2 F2 F11 F7 F8F8 F8 F1 F11 Upper arm Wrist F3 F9 F7 F12 F1 F2 F11 Wrist arm F3 F3F9 F9F7F12F12F2 F1F11 F2F8 F11 Upper F1 Ankle Ankle F12 F10 Wrist F9 F9 F3F3 F3 F9F1 F1 F7F12 F12F7F7 F1 F2F2 F2 F10 F11

8F8 F12 8 99 F8 F2 F8 F8 F12 F12 F2 F1 F10 F2 F8 F8 F1 F10 F10 F1 F12 F10 F10 F12 F1 F10 F10 F12 F1 F10 F7 F10 F1 F10 F7 F10 F8 F10 F7 F8 F10 F11 F8 F11 F10 F8

12

13

14 15 16 17 18 19 14 F6 15 F13 16 F18 F15 14 15 16 1717 F19 1818 F17 1919 F15 F13 F6 F13 F13 F18 F18F19 F19F17 F17 F14 F5 F19 F17 F18 F15 F6 F14 F13 F13 F5 F5 F19 F19F17 F17F18 F18 F16 F13 F4 F18 F17 F19 F14 F16 F15 F13 F4 F17 F18 F19 F17F18 F19 F6 F16 F13 F14 F4 F18 F17 F19 F6 F15 F14 F17 F19 F18 F13 F14 F14 F5 F17 F19 F18 F19 F6 F13 F15 F14 F5 F17 F17 F18F18F19 F4 F14 F5 F17 F18 F19 F13 F4 F14 F14 F5 F5 F17 F17F18 F18F19 F19 F13 F5 F14 F17 F18 F19 F13 F14 F5 F5 F14 F17 F17F18 F18F19 F19 F4 F5 F13 F13 F14 F14 F17 F18F18 F19F19 F17 F5 F14 F18 F19 F17 F13 F5 F15 F4 F5 F13 F14 F18 F19 F17 12 13 F5 F14 12 13 F5 F14 F15 F4 F5 F14 F15 F4 F4 F15 F6 F15 F15 F6 F13 F6 F5 F15 F13 F5 F16 F5 F4 F13 F16 F4 F13 F16 F4 F13 F15 F15 F15 F4 F15 F15 F13 F15 F4 F15

Figure6.6.The Theaverage averageaccuracy accuracy of of the the eight eight classification onon DS1. Figure classificationmodels modelsacross acrossall allsensor sensorpositions positions DS1. Figure 6. The average accuracy of the eight classification models across all sensor positions on DS1.

Figure 7. Cont.

Sensors 2017, 17, 774 Sensors 2017, 17, 774

9 of 16 9 of 16

Figure Figure 7. 7. Accuracy Accuracy of of different different classification classification algorithms algorithms across across all all sensor sensor positions. positions. Table Table 3. 3. Settings Settings with with the the highest highest accuracy accuracy for for different different sensor sensor positions. positions. Position Position Side waist Front waist Side waist FrontChest waist Chest Thigh Thigh Head Head arm Upper Upper arm Wrist Wrist Ankle Ankle

Number of Features Best Algorithm Accuracy Number Best Algorithm 98.34 Accuracy 10 of Features NB 11 10 NB 96.45 98.34 NB 10 11 NB 98.50 96.45 NB 5 10 1NN NB 99.00 98.50 12 5 NB 1NN 86.38 99.00 17 12 3NN NB 80.83 86.38 17 3NN 6 NN 80.60 80.83 6 NN 80.60 7 NB 90.70 7 NB 90.70

Table 4 shows the best algorithms versus different numbers of features and sensor positions. Table 4 shows the bestexcept algorithms versus different of features andbest sensor positions.do Fornot all For all sensor positions for the thigh, uppernumbers arm, and wrist, the algorithms sensor positions except for the thigh, upper arm, and wrist, the best algorithms do not change when change when more than 12 features are used. It is well known that the best classification algorithm more than 12 features arealgorithm used. It isthat welloccurs knownmost that the best classification algorithm is data-dependent. The often for a sensor position canisbedata-dependent. regarded as a The algorithm thatalgorithm occurs most for a sensor position regarded as aa generally generally suitable suitable generally suitable for often that sensor position. Fromcan the be results, NB is algorithm for that sensor position. From the results, NB is a generally suitable algorithm for the side algorithm for the side of the waist, chest, head, and ankle, while 1NN, 3NN, and NN are generally of the waist, chest, head, and ankle, while 1NN, 3NN, and NN are generally suitable algorithms for suitable algorithms for the thigh, upper arm, and wrist, respectively. Apart from the front of the the thigh, arm,suitable and wrist, respectively. from the front of theyield waist,the the best generally suitable waist, the upper generally algorithms are Apart also the algorithms that classification algorithms are also the algorithms that yield the best classification accuracy, shown in Table 3. Forbest the accuracy, shown in Table 3. For the front of the waist, although SVM occurs most often as the front of theitwaist, although SVMmore occurs most as the best algorithm, it occurs only when more algorithm, occurs only when than theoften top six features are used. When a fewer number of than the top six features are used. When a fewer number of features are used, NB is considered features are used, NB is considered a generally suitable algorithm for this position. Figure 8a generally suitable algorithm with for this position. Figurealgorithms 8 summarizes the frequency whichacross different summarizes the frequency which different appear as the bestwith models all algorithms appear as the models all experimental In for general, NB is considered experimental settings. Inbest general, NBacross is considered the bestsettings. algorithm this dataset, followed the by best algorithm this dataset, followed by SVM, 3NN, and NN. SVM, 3NN, andfor NN. Table 4. 4. Best Best algorithms algorithms for for different different numbers numbers of of features features and and sensor sensor positions. positions. Table Position

Position

11 Side waist NB Side waist NB Front waist BN Front waist BN Chest NB Chest NB Thigh BN Thigh BN Head NB Head NB Upper arm NB NB Upper arm Wrist NN Wrist NN Ankle NB Ankle NB

2 3 34 2 NB NB NB NB NB NB NB NB NB NB NB NB NB NB NB BN 3NN BN 3NN 3NN NBNB NB NB 3NN NBNB NB NB 3NN NN 3NN 3NN NN 3NN NB NB NB NB NB

4 5 NB NB NB NN NB NB 3NN NN 1NN 3NN NN 3NN 3NN 3NN NB NB

FeatureRanks Ranks Feature 5 6 7 8 9 10 12 11 13 12 14 13 1514 6 7 8 9 10 11 NB NB NB NB NB NB NB NB NB NB NB NB NB NB NB NB NB NB NB NB NN 3NN SVM SVM SVM NB NB NB SVM SVM 3NN SVM SVM SVM NB NB NB SVM SVM SVM NB NB NB NB NB NB NB NB NB NB NB NB NB NB NB NB NB NB NB NB 1NN1NN 1NN 1NN 1NN NNNN1NN NN NN1NNNNNN 1NNNN1NN1NN 1NN1NN 1NN NB1NNNB NBNB NB NNNB NBNN NB NBNB NBNB NB NBNB NB NB 3NN 3NN 3NN3NN 3NN NN3NN3NN 3NNSVM 3NN3NN SVM3NN3NN 3NN3NN 3NN 3NN 3NN NN PART NN SVM SVM SVM 3NNNN NN NN PARTNNNNSVMNNNN SVM NN SVM SVM NB NB NB NB NB NB NB NB NB NB NB NB NB NB NB NB NB NB NB NB

15 16 NB NB SVM SVM NB NB 1NN 1NN NB NB 3NN 3NN SVM SVM NB NB

16 1718 18 19 19 17 NB NB NB NB NB NB NB SVM SVM SVM SVM SVM SVM SVM NB NB NB NB NB NB NB 1NN NN NN NN NNNNNN NB NB NB NBNB NB NB 3NN 3NN SVMSVM SVM 3NN SVM SVM NN SVM SVM NNNNNN NB NB NB NB NB NB NB

Sensors 2017, 17, 774 Sensors 2017, 17, 774

82

19

19

19

9 1 NN

3NN

1NN

J48

SVM

0

PART

3 NB

100 90 80 70 60 50 40 30 20 10 0

BN

No. of occurrences

10 of 16 10 of 16

Classification algorithms

classification algorithms algorithms in in Table Table 4. 4. Figure 8. The number of occurrences of the eight classification

The class-specific class-specific accuracy accuracy values values for The for the the best best models models shown shown in in Table Table 33 are are detailed detailed in in Table Table 5. 5. The limbs, i.e., the upper arm and wrist, are not suitable positions since they yield low accuracy for The limbs, i.e., the upper arm and wrist, are not suitable positions since they yield low accuracy for several activities activities (with (with the the average average accuracy accuracy being being less less than than 85%). 85%). Average Average accuracy accuracy values values greater greater several than 96% 96% are are obtained obtained from from four four sensor sensor positions, positions, i.e., i.e., the the side side of of the the waist, waist, front front of of the the waist, waist, chest, than chest, and thigh. Lying postures are most difficult to classify when sensors are placed on the limbs, and thigh. Lying postures are most difficult to classify when sensors are placed on the limbs, i.e., i.e., the upper upper arm, arm, wrist, wrist, and and ankle. ankle. When When different different subjects subjects perform perform the the same same lying lying posture, posture, their their limb limb the positions may may be be different. different. Sitting Sitting is is most most difficult difficult to to classify classify when when aa sensor sensor is is placed placed on on the the head; head; it it positions is often misclassified as standing when a subject is sitting upright. Although the thigh appears to be is often misclassified as standing when a subject is sitting upright. Although the thigh appears to be the position position that that yields yields the the highest highest average average accuracy accuracy in in this this experiment, experiment, users users may may sit sit with with different different the positions of their legs in realistic scenarios. In many other related works [10,21,59–61], a common positions of their legs in realistic scenarios. [10,21,59–61], a common suggestionisistotoplace place sensor at waist the waist as location this location less affected by peripheral body suggestion thethe sensor at the as this is less is affected by peripheral body motions motions than the upperlimbs. or lower limbs.ofInusability, terms ofwearing usability, wearing a sensor the waist is more than the upper or lower In terms a sensor at the waist at is more comfortable comfortable to the thigh,for particularly compared to compared the thigh, particularly elderlies. for elderlies. Table5.5.The Theactivities activitiesofofdaily daily living (ADL) classification results obtained the models best models on Table living (ADL) classification results obtained fromfrom the best on DS1. DS1. Activities Activities Average Position Position Average Sitting Supine Lying Left Prone Lying Right Standing Walking Sitting Supine Lying Left Prone Lying Right Standing Walking Side waist waist 94.05 99.79 100.00 97.50 99.79 97.27 100.00 98.34 Side 94.05 99.79 100.00 97.50 99.79 97.27 100.00 98.34 Front waist 93.63 99.66 94.06 98.61 90.48 98.69 100.00 96.45 Front waist 93.63 99.66 94.06 98.61 90.48 98.69 100.00 96.45 Chest 92.72 100.00 100.00 100.00 99.83 97.14 99.81 98.50 Chest 92.72 100.00 100.00 100.00 99.83 97.14 99.81 98.50 Thigh 93.97 99.28 100.00 100.00 100.00 100.00 99.78 99.00 Thigh 93.97 99.28 100.00 100.00 100.00 100.00 99.78 99.00 Head 35.20 99.05 99.18 89.09 94.50 88.40 99.26 86.38 Head 35.20 99.05 99.18 89.09 94.50 88.40 99.26 86.38 Upper arm 92.59 71.65 84.90 49.79 69.30 98.50 99.11 80.83 Wrist 77.25 78.24 72.59 58.42 80.45 98.45 98.77 80.60 Upper arm 92.59 71.65 84.90 49.79 69.30 98.50 99.11 80.83 Ankle 97.61 79.91 87.71 80.31 93.42 98.82 97.13 90.70 Wrist 77.25 78.24 72.59 58.42 80.45 98.45 98.77 80.60 Ankle 97.61 79.91 87.71 80.31 93.42 98.82 97.13 90.70

4.2. Validation Using DS2 (Elderly Subjects) 4.2. Validation Using DS2 (Elderly Subjects) Feature ranking in the dataset DS2 and the possibility of applying a classifier trained from DS1 Feature in the dataset DS2 and thesignals possibility of applying a classifier from to DS2 were ranking next investigated. Acceleration in DS2 were collected at a trained sampling rateDS1 of to DS2 were next investigated. Acceleration signals in DS2 were collected at a sampling rate of 50 50 Hz using a BSN node placed only on the side of the waist. The signals were down-sampled to Hz using a BSN placed only on technique the side ofwas theused waist. signalsnoise. were To down-sampled to approximately 15 node Hz. A median filter to The eliminate ensure that the approximately 15 from Hz. A filter are technique was used to eliminate noise. thatwas the features extracted themedian two devices comparable, the coordinate system of To theensure BSN node featureswith extracted from the two devices are the comparable, the coordinatethe system of the BSN node was aligned that of an e-AR sensor. After matrix transformation, Relief-F feature selection aligned with of antoe-AR the matrix transformation, the Relief-F selection algorithm wasthat applied DS2. sensor. Table 6 After compares the ranks of the 19 features obtainedfeature from DS1 when aalgorithm sensor was placed on the the waist (cf. the first row ofofTable those obtained obtained from DS2. was applied to side DS2.ofTable 6 compares the ranks the 2) 19and features DS1 At the aside of the waist, theon most number is ten (cf. Table 3).those According to when sensor was placed the appropriate side of the waist (cf. of thefeatures first row of Table 2) and obtained from DS2. At the side of the waist, the most appropriate number of features is ten (cf. Table 3). According to Table 6, all ten highest ranked features for DS1 also appear among the ten highest

Sensors 2017, 17, 774

11 of 16

Sensors 2017, Table 6, all17, ten774 highest

11 offor 16 ranked features for DS1 also appear among the ten highest ranked features DS2. Six ADL types are common to DS1 and DS2 (cf. Section 2), i.e., sitting, standing, walking, supine, ranked for DS2. ADL types areside. common and (cf. Section 2),values i.e., sitting, lying onfeatures the left side, and Six lying on the right Figureto9 DS1 shows theDS2 average accuracy of the standing, walking, supine, lying on the left side, and lying on the right side. Figure 9 shows the eight classification models for these six common ADL types when the top f features were used for each average theExcept eight for classification models forthree theseand six the common types integer f accuracy such that values 1 ≤ f ≤of19. the case when the top top sixADL features arewhen used, the top f features were used for each integer f such that 1  f  19. Except for the case when the top the average accuracy values on DS1 and DS2 are almost the same. Based on Table 6 and Figure 9, it three and the topthe sixtop features are used, theinaverage on of DS1 DS2for are almost the is expected that ten features used the bestaccuracy model atvalues the side theand waist DS1 are also same. Based for on DS2. Table 6 and Figure 9, it is expected that the top ten features used in the best model appropriate at the side of the waist for DS1 are also appropriate for DS2.

Table 6. The feature rankings obtained from Relief-F on DS1 and Dataset 2 (DS2) for the side of Table 6. The feature rankings obtained from Relief-F on DS1 and Dataset 2 (DS2) for the side of the the waist. waist. Feature Ranks

Dataset

Dataset1

DS1 DS1 F3 DS2 DS2 F3

2

3

4

5

1 2 3 4 F9F3 F7F9 F10 F7 F1 F10 F12 F3 F9 F12 F10 F9 F7 F10

6

5 F11 F1 F1 F7

Feature Ranks 7 8 9 10 11 12 6 7 8 9 10 11 12 F2 F2 F8 F8F12 F11 F12F16 F16 F4F4 F5 F5 F11 F11 F2 F2F8 F8 F16 F1 F16 F14 F14 F5 F5

13

13 F14 F14 F13 F13

14

14 F15 F15 F4 F4

15

16

17

18

19

15 16 17 18 19 F6 F13 F13 F18 F18F19 F19F17 F17 F6 F15 F6 F6 F19 F19F18 F18F17 F17 F15

Figure Figure 9. 9. Comparison Comparison of of average average accuracy accuracy using using feature feature ranking ranking obtained obtained from from DS1 DS1 and and DS2. DS2.

The best model at the side of the waist for DS1, i.e., NB, is validated on DS2 by using the top The best model at the side of the waist for DS1, i.e., NB, is validated on DS2 by using the top ten ten features derived from DS1 for the side of the waist. Table 7 shows the ADL classification results. features derived from DS1 for the side of the waist. Table 7 shows the ADL classification results. The The accuracy values of all ADL types are greater than 92%. The average accuracy is 95.77%, which is accuracy values of all ADL types are greater than 92%. The average accuracy is 95.77%, which is only only slightly lower than the average accuracy obtained on DS1 using the same model and features slightly lower than the average accuracy obtained on DS1 using the same model and features (98.34%, (98.34%, cf. the first row of Table 3). cf. the first row of Table 3). Table 7. The ADL classification results on DS2 using Naïve Bayes (NB) with the top ten features Table 7. The ADL classification results on DS2 using Naïve Bayes (NB) with the top ten features derived derived from DS1. from DS1. Activities Average Activities Sitting Standing Walking Supine Ling Left Lying Right Average 96.03 Standing 96.78 100.00 94.32 92.04 Sitting Walking Supine Ling Left 95.43 Lying Right 95.77 96.03

96.78

100.00

4.3. Comparison with a Transfer Learning Method

94.32

92.04

95.43

95.77

A transfer learning was defined asMethod the ability to extend what has been learned in one context to 4.3. Comparison with a Transfer Learning new contexts [62]. A summary of several existing works on activity recognition using transfer A transfer learning was defined as the ability to extend what has been learned in one context learning can be found in [63]. A recent work that is closely related to our study is presented in [64], in to new contexts [62]. A summary of several existing works on activity recognition using transfer which three different asynchronous data mapping (ADM) algorithms, i.e., brute force ADM learning can be found in [63]. A recent work that is closely related to our study is presented in [64], in (BFADM), clustering-based ADM (CADM), and motif-based ADM (MADM), were introduced for which three different asynchronous data mapping (ADM) algorithms, i.e., brute force ADM (BFADM), supporting knowledge transfer in wearable systems. Tri-axial accelerometers (embedded in clustering-based ADM (CADM), and motif-based ADM (MADM), were introduced for supporting smartphones) with four different sampling rates, i.e., 50, 100, 150, and 200 Hz, were used for activity recognition. Nine young subjects were asked to perform six types of ADLs, i.e., walking, sitting, standing, walking downstairs, walking upstairs, and biking, while wearing eight smartphones (two phones for each sampling rate) on their waists. Three experiments were conducted, i.e., inter-subject,

Sensors 2017, 17, 774

12 of 16

knowledge transfer in wearable systems. Tri-axial accelerometers (embedded in smartphones) with four different sampling rates, i.e., 50, 100, 150, and 200 Hz, were used for activity recognition. Nine young subjects were asked to perform six types of ADLs, i.e., walking, sitting, standing, walking downstairs, walking upstairs, and biking, while wearing eight smartphones (two phones for each sampling rate) on their waists. Three experiments were conducted, i.e., inter-subject, inter-device, and inter-model. The inter-subject experiment used data collected from eight subjects to train classification models and evaluated them with the remaining subject. The inter-device and inter-model experiments used data collected from one phone to train models, which were then tested using signals from another phone with the same sampling rate and signals from another phone with a different sampling rate, respectively. The classification models were trained and tested based on normalized cross-correlation with the resulting values lying between −1 and 1. Three classification algorithms were used, i.e., kNN, decision tree, and random forest. Among the three mapping algorithms, BFADM yielded the highest accuracy using random forest. It was concluded in [64] that the recognition accuracy of their approach could be affected by sampling frequency variation, device variation, and subject variation. In addition, cross-correlation is a poor measure to capture subject variation. Another limitation of their approach is the ability to handle static activities, especially when device orientations are different (since it relies on signal motifs, which are subsequences that occur repeatedly in time series). In our study, we use signal resampling to handle the difference in sampling frequency, data normalization to handle inter-subject variation, and data transformation to handle the difference in sensor orientations. Table 8 compares the experimental settings and classification accuracy in our study with those in [64]. Table 8. Comparison between our work and the work presented in [64]. Our Study No. of subjects

12 young subjects

Saeedi et al.’s Study 9 young subjects

48 elderly subjects Sensor

3D accelerometers

3D accelerometers

Sampling rate

15 and 50 Hz

50, 100, 150, and 200 Hz

Features

19 features, with Relief-F feature selection algorithm

Signal similarity

Window size

1 s (shifted by 0.5 s)

2 s (shifted by 0.5 s)

Sensor placements

Side waist, front waist, chest, thigh, head, upper arm, wrist, and ankle

Waist

Activities

Sitting, supine, lying on the left side, prone, lying on the right side, standing, and walking

Walking, sitting, standing, walking downstairs, walking upstairs, and biking

Classifiers

BN, NB, J48, PART, kNN, NN, and SVM

kNN, decision tree, and random forest

Accuracy

98.34% (side waist, using NB with 10 features)

~85% (with random forest)

5. Conclusions This study presents an analysis of the optimal settings for activity classification in terms of sensor positions, features, and classifiers and assesses the possibility of applying a trained model to data acquired from a different experimental scenario. Focusing on monitoring basic activities performed by elderlies, only four lying postures, sitting, standing, and walking, are considered. In the first experiment, activity classification was performed on a dataset collected from young subjects using e-AR sensors attached to eight different parts of the subjects’ bodies, i.e., the side of the waist, front of the waist, chest, thigh, head, upper arm, wrist, and ankle. Nineteen features were extracted and their importance was measured by using the Relief-F feature selection algorithm. Different combinations of features and eight classification algorithms on different sensor positions were investigated. For each sensor position, the best classification model and the most appropriate features were reported. The mean and the maximum values along the upward axis were the top two

Sensors 2017, 17, 774

13 of 16

common features used for all sensor positions. Among the eight positions, the side of the waist, front of the waist, chest, and thigh were the optimal sensor positions. NB outperforms other classifiers for most feature combinations. The NB algorithm with ten to eleven features was the best model for the side of the waist, front of the waist, and chest, while the 1NN algorithm with five features was the best model for the thigh. In the second experiment, the dataset was collected from the elderly subjects using a BSN node placed on the side of the waist. To process the signals from different environment settings, signals with high sampling rates were down-sampled and coordinate systems were aligned to the same direction. The experimental results show that the best model derived from the young-subject dataset can still perform with high classification accuracy when applied to the elderly-subject dataset. This demonstrates that data collection effort could be saved when a new hardware platform is developed, i.e., classification models obtained from a previous data collection scenario could be applicable on a new hardware platform, provided that appropriate data preprocessing has been performed. Acknowledgments: This work was supported by the Thailand Research Fund (TRF), under the Royal Golden Jubilee Ph.D. Program Grant No. PHD/0247/2552, the National Research University Project, funded by the Thailand Office of Higher Education Commission, the Centre of Excellence in Intelligent Informatics, Speech and Language Technology and Service Innovation (CILS), Thammasat University, and the Anandamahidol Foundation. Author Contributions: N.P. and S.T. conceived and designed the experiments; I.A. wrote software for data collection; N.P. performed the experiments; N.P., S.T. and E.N. analyzed the data; N.P., S.T., E.N. and I.A. wrote the paper. Conflicts of Interest: The authors declare no conflict of interest.

Abbreviations The following abbreviations are used in this manuscript: BSN ADL BN NB PART kNN NN SVM

Body sensor network Activity of daily living Bayesian network Naïve Bayes Partial-tree rule learning k nearest neighbors Neural network Support vector machine

References 1. 2.

3.

4. 5. 6.

Yang, G.-Z. Body Sensor Networks; Springer: London, UK, 2006. Bouten, C.; Sauren, A.; Verduin, M.; Janssen, J. Effects of placement and orientation of body-fixed accelerometers on the assessment of energy expenditure during walking. Med. Biol. Eng. Comput. 1997, 35, 50–56. [CrossRef] [PubMed] Swartz, A.; Strath, S.; Bassett, D.J.; O’Brien, W.; King, G.; Ainsworth, B. Estimation of energy expenditure using csa accelerometers at hip and wrist sites. Med. Sci. Sports Exerc. 2000, 32, S450–S456. [CrossRef] [PubMed] Crouter, S.E.; Clowers, K.G.; Bassett, D.R. A novel method for using accelerometer data to predict energy expenditure. J. Appl. Physiol. 2006, 100, 1324–1331. [CrossRef] [PubMed] Mayagoitia, R.E.; Lötters, J.C.; Veltink, P.H.; Hermens, H. Standing balance evaluation using a triaxial accelerometer. Gait Posture 2002, 16, 55–59. [CrossRef] Moe-Nilssen, R.; Helbostad, J.L. Trunk accelerometry as a measure of balance control during quiet standing. Gait Posture 2002, 16, 60–68. [CrossRef]

Sensors 2017, 17, 774

7.

8.

9. 10. 11.

12.

13.

14. 15. 16. 17. 18.

19.

20.

21. 22. 23. 24.

25. 26.

14 of 16

Pannurat, N.; Theekakul, P.; Thiemjarus, S.; Nantajeewarawat, E. Toward real-time accurate fall/fall recovery detection system by incorporating activity information. In Proceedings of the IEEE-EMBS International Conference on Biomedical and Health Informatics, Hong Kong, Shenzhen, China, 5–7 January 2012; pp. 196–199. King, R.C.; Atallah, L.; Wong, C.; Miskelly, F.; Yang, G.Z. Elderly risk assessment of falls with bsn. In Proceedings of the International Conference on Body Sensor Networks, Singapore, 7–9 June 2010; pp. 30–35. Ravi, N.; Dandekar, N.; Mysore, P.; Littman, M.L. Activity recognition from accelerometer data. In Innovative Applications of Artificial Intelligence; AAAI Press: Pittsburgh, PA, USA, 2005; Volume 3, pp. 1541–1546. Bao, L.; Intille, S.S. Activity recognition from user-annotated acceleration data. In Proceedings of the Second International Conference on Pervasive Computing, Vienna, Austria, 21–23 April 2004; pp. 1–17. Fortino, G.; Gravina, R. Rehab-aaservice: A cloud-based motor rehabilitation digital assistant. In Proceedings of the Eighth International Conference on Pervasive Computing Technologies for Healthcare, Oldenburg, Germany, 20–23 May 2014; pp. 305–308. Covello, R.; Fortino, G.; Gravina, R.; Aguilar, A.; Breslin, J.G. Novel method and real-time system for detecting the cardiac defense response based on the ecg. In Proceedings of the IEEE International Symposium on Medical Measurements and Applications, Gatineau, QC, Canada, 4–5 May 2013; pp. 53–57. Nuksawn, L.; Nantajeewarawat, E.; Thiemjarus, S. Real-time sensor- and camera-based logging of sleep postures. In Proceedings of the International Computer Science and Engineering Conference, Chiang Mai, Thailand, 23–26 November 2015; pp. 1–6. Shoaib, M.; Bosch, S.; Incel, O.D.; Scholten, H.; Havinga, P.J.M. Fusion of smartphone motion sensors for physical activity recognition. Sensors 2014, 14, 10146–10176. [CrossRef] [PubMed] Shoaib, M.; Bosch, S.; Incel, O.D.; Scholten, H.; Havinga, P.J.M. Complex human activity recognition using smartphone and wrist-worn motion sensors. Sensors 2016, 16, 426. [CrossRef] [PubMed] Godfrey, A.; Bourke, A.K.; Ólaighin, G.M.; van de Ven, P.; Nelson, J. Activity classification using a single chest mounted tri-axial accelerometer. Med. Eng. Phys. 2011, 33, 1127–1135. [CrossRef] [PubMed] Casson, A.J.; Vazquez Galvez, A.; Jarchi, D. Gyroscope vs. Accelerometer measurements of motion from wrist ppg during physical exercise. ICT Express 2016, 2, 175–179. [CrossRef] Fortino, G.; Giannantonio, R.; Gravina, R.; Kuryloski, P.; Jafari, R. Enabling effective programming and flexible management of efficient body sensor network applications. IEEE Trans. Hum. Mach. Syst. 2013, 43, 115–133. [CrossRef] Gjoreski, H.; Lustrek, M.; Gams, M. Accelerometer placement for posture recognition and fall detection. In Proceedings of the Seventh International Conference on Intelligent Environments, Nottingham, UK, 25–28 July 2011; pp. 47–54. Cleland, I.; Kikhia, B.; Nugent, C.; Boytsov, A.; Hallberg, J.; Synnes, K.; McClean, S.; Finlay, D. Optimal placement of accelerometers for the detection of everyday activities. Sensors 2013, 13, 9183–9200. [CrossRef] [PubMed] Atallah, L.; Lo, B.; King, R.; Yang, G. Sensor positioning for activity recognition using wearable accelerometers. IEEE Trans. Biomed. Circuits Syst. 2011, 5, 320–329. [CrossRef] [PubMed] Gravina, R.; Alinia, P.; Ghasemzadeh, H.; Fortino, G. Multi-sensor fusion in body sensor networks: State-of-the-art and research challenges. Inf. Fusion 2017, 35, 68–80. [CrossRef] Ghasemzadeh, H.; Panuccio, P.; Trovato, S.; Fortino, G.; Jafari, R. Power-aware activity monitoring using distributed wearable sensors. IEEE Trans. Hum. Mach. Syst. 2014, 44, 537–544. [CrossRef] Thiemjarus, S.; Pansiot, J.; Mcllwraith, D.G.; Lo, B.P.L.; Yang, G.-Z. An integrated inferencing framework for context sensing. In Proceedings of the Fifth International Conference on Information Technology and Applications in Biomedicine, Shenzhen, China, 30–31 May 2008; pp. 270–274. Thiemjarus, S.; James, A.; Yang, G.-Z. An eye hand data fusion framework for pervasive sensing of surgical activities. Pattern Recognit. 2012, 45, 2855–2867. [CrossRef] Yeoh, W.S.; Pek, I.; Yong, Y.H.; Chen, X.; Waluyo, A.B. Ambulatory monitoring of human posture and walking speed using wearable accelerometer sensors. In Proceedings of the Thirtieth Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Vancouver, BC, Canada, 20–25 August 2008; pp. 5184–5187.

Sensors 2017, 17, 774

27. 28.

29.

30.

31.

32. 33. 34.

35. 36. 37.

38.

39.

40. 41.

42.

43. 44.

45. 46. 47.

15 of 16

Mathie, M.J.; Coster, A.C.F.; Lovell, N.H.; Celler, B.G. Detection of daily physical activities using a triaxial accelerometer. Med. Biol. Eng. Comput. 2003, 41, 296–301. [CrossRef] [PubMed] Baek, J.; Lee, G.; Park, W.; Yun, B.-J. Accelerometer signal processing for user activity detection. In Knowledge-Based Intelligent Information and Engineering Systems; Negoita, M., Howlett, R., Jain, L., Eds.; Springer: Berlin/Heidelberg, Germany, 2004; Volume 3215, pp. 610–617. Meijer, G.A.L.; Westerterp, K.R.; Verhoeven, F.M.H.; Koper, H.B.M.; Hoor, F.T. Methods to assess physical activity with special reference to motion sensors and accelerometers. IEEE Trans. Biomed. Eng. 1991, 38, 221–229. [CrossRef] [PubMed] Maurer, U.; Smailagic, A.; Siewiorek, D.P.; Deisher, M. Activity recognition and monitoring using multiple sensors on different body positions. In Proceedings of the International Workshop on Wearable and Implantable Body Sensor Networks, Cambridge, MA, USA, 3–5 April 2006; pp. 113–116. Tamura, T.; Fujimoto, T.; Muramoto, H.; Huang, J.; Sakaki, H.; Togawa, T. The design of an ambulatory physical activity monitor and it application to the daily activity of the elderly. In Proceedings of the Seventeenth IEEE Annual Conference on Engineering in Medicine and Biology Society, Montreal, QC, Canada, 20–23 September 1995; pp. 1591–1592. Mehmood, A.; Raza, A.; Nadeem, A.; Saeed, U. Study of multi-classification of advanced daily life activities on shimmer sensor dataset. Int. J. Commun. Networks Inf. Secur. 2016, 8, 86–92. Gupta, P.; Dallas, T. Feature selection and activity recognition system using a single triaxial accelerometer. IEEE Trans. Biomed. Eng. 2014, 61, 1780–1786. [CrossRef] [PubMed] Leutheuser, H.; Schuldhaus, D.; Eskofier, B.M. Hierarchical, multi-sensor based classification of daily life activities: Comparison with state-of-the-art algorithms using a benchmark dataset. PLoS ONE 2013, 8, e75196. Lyons, G.M.; Culhane, K.M.; Hiltob, D.; Grace, P.A.; Lyons, D. A description of an accelerometer-based mobility monitoring technique. Med. Eng. Phys. 2005, 27, 497–504. [CrossRef] [PubMed] Lara, Ó.D.; Pérez, A.J.; Labrador, M.A.; Posada, J.D. Centinela: A human activity recognition system based on acceleration and vital sign data. Pervasive Mob. Comput. 2012, 8, 717–729. [CrossRef] McGlynn, D.; Madden, M.G. An ensemble dynamic time warping classifier with application to activity recognition. In Research and Development in Intelligent Systems XXVII; Bramer, M., Petridis, M., Hopgood, A., Eds.; Springer: London, UK, 2011; pp. 339–352. Khan, A.M.; Lee, Y.K.; Lee, S.Y.; Kim, T.S. A triaxial accelerometer-based physical-activity recognition via augmented-signal features and a hierarchical recognizer. IEEE Trans. Inf. Technol. Biomed. 2010, 14, 1166–1172. [CrossRef] [PubMed] Ermes, M.; Parkka, J.; Cluitmans, L. Advancing from offline to online activity recognition with wearable sensors. In Proceedings of the Thirtieth Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Vancouver, BC, Canada, 20–25 August 2008; pp. 4451–4454. Parkka, J.; Ermes, M.; Korpipaa, P.; Mantyjarvi, J.; Peltola, J.; Korhonen, I. Activity classification using realistic data from wearable sensors. IEEE Trans. Inf. Technol. Biomed. 2006, 10, 119–128. [CrossRef] [PubMed] Ahmadi, A.; Mitchell, E.; Richter, C.; Destelle, F.; Gowing, M.; Moran, K. Toward automatic activity classification and movement assessment during a sports training session. IEEE Inter. Things J. 2015, 2, 23–32. [CrossRef] Min, J.K.; Cho, S.B. Activity recognition based on wearable sensors using selection/fusion hybrid ensemble. In Proceedings of the IEEE International Conference on Systems, Man and Cybernetics, Anchorage, AK, USA, 9–12 October 2011; pp. 1319–1324. Menz, H.B.; Lord, S.R.; Fitzpatrick, C. Age-related differences in walking stability. Age Ageing 2003, 32, 137–142. [CrossRef] [PubMed] Gaglione, A.; Chen, S.; Lo, B.; Yang, G.Z. A low-power opportunistic communication protocol for wearable applications. In Proceedings of the Twelfth International Conference on Wearable and Implantable Body Sensor Networks, Cambridge, MA, USA, 9–12 June 2015; pp. 1–6. Bsn Development kit v.3. Available online: http://vip.doc.ic.ac.uk/bsn/a1892.html (accessed on 10 March 2017). Yang, G.-Z. Body Sensor Networks, 2nd ed.; Springer: London, UK, 2014. Kononenko, I. Estimating attributes: Analysis and extensions of relief. In Proceedings of the European Conference on Machine Learning on Machine Learning, Catania, Italy, 6–8 April 1994; pp. 171–182.

Sensors 2017, 17, 774

48.

49. 50.

51. 52. 53.

54. 55.

56. 57. 58.

59.

60. 61.

62. 63. 64.

16 of 16

Kira, K.; Rendell, L.A. A practical approach to feature selection. In Proceedings of the Ninth International Workshop on Machine Learning; Morgan Kaufmann Publishers Inc.: Burlington, MA, USA, 1992; pp. 249–256. Howcroft, J. Evaluation of Wearable Sensors as an Older Adult Fall Risk Assessment Tool; UWSpace: Waterloo, ON, Canada, 2016. Zhang, M.; Sawchuk, A.A. A feature selection-based framework for human activity recognition using wearable multimodal sensors. In Proceedings of the Sixth International Conference on Body Area Networks; ICST: Beijing, China, 2011; pp. 92–98. Liu, H.; Motoda, H. Computational Methods of Feature Selection; CRC Press: Boca Raton, FL, USA, 2007. Cooper, G.F.; Herskovits, E. A bayesian method for the induction of probabilistic networks from data. Mach. Learn. 1992, 9, 309–347. [CrossRef] George, H.J.; Langley, P. Estimating continuous distributions in bayesian classifiers. In Proceedings of the Eleventh Conference on Uncertainty in Artificial Intelligence, Montreal, QC, Canada, 18–20 August 1995; pp. 338–345. Quinlan, R. C4.5: Programs for Machine Learning; Morgan Kaufmann Publishers: San Mateo, CA, USA, 1993. Frank, E.; Witten, I.H. Generating accurate rule sets without global optimization. In Proceedings of the Fifteenth International Conference on Machine Learning; Morgan Kaufmann Publishers Inc.: Burlington, MA, USA, 1998; pp. 144–151. Aha, D.; Kibler, D. Instance-based learning algorithms. Mach. Learn. 1991, 6, 37–66. [CrossRef] Haykin, S. Neural Networks: A Comprehensive Foundation; Prentice Hall PTR: Upper Saddle River, NJ, USA, 1998. Platt, J. Fast training of support vector machines using sequential minimal optimization. In Advances in Kernel Methods—Support Vector Learning; Schoelkopf, B., Burges, C., Smola, A., Eds.; MIT Press: Cambridge, MA, USA, 1999. Kangas, M.; Konttila, A.; Winblad, I.; Jamsa, T. Determination of simple thresholds for accelerometry-based parameters for fall detection. In Proceedings of the Twenty-Ninth Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Lyon, France, 22–26 August 2007; pp. 1367–1370. Kumahara, H.; Tanaka, H.; Schutz, Y. Daily physical activity assessment: What is the importance of upper limb movements vs. whole body movements? Int. J. Obes. 2004, 28, 1105–1110. [CrossRef] [PubMed] Bianchi, F.; Redmond, S.J.; Narayanan, M.R.; Cerutti, S.; Lovell, N.H. Barometric pressure and triaxial accelerometry-based falls event detection. IEEE T. Neur. Sys. Reh. Eng. 2010, 18, 619–627. [CrossRef] [PubMed] Byrnes, J.P. Cognitive Development and Learning in Instructional Contexts; Allyn and Bacon: Boston, MA, USA, 1996. Cook, D.; Feuz, K.D.; Krishnan, N.C. Transfer learning for activity recognition: A survey. Knowl. Inf. Syst. 2013, 36, 537–556. [CrossRef] [PubMed] Saeedi, R.; Ghasemzadeh, H.; Gebremedhin, A.H. Transfer learning algorithms for autonomous reconfiguration of wearable systems. In Proceedings of the IEEE International Conference on Big Data, Washington, DC, USA, 5–8 December 2016; pp. 563–569. © 2017 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

Analysis of Optimal Sensor Positions for Activity Classification and Application on a Different Data Collection Scenario.

This paper focuses on optimal sensor positioning for monitoring activities of daily living and investigates different combinations of features and mod...
NAN Sizes 0 Downloads 12 Views