# Optimizing Sensor Deployment for Multi-Sensor-Based HAR System with Improved Glowworm Swarm Optimization Algorithm

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

^{M}− 1 nonempty base classifier subsets if a classifier pool contains M base classifiers. This makes selecting a subset of the classifier with the optimal performance an NP-complete problem.

- (1)
- Activity recognition framework: we design a multi-sensor-based HAR framework in which the sensor deployment can be optimized to find a tradeoff between the number of sensors and system performance.
- (2)
- A novel optimization-based selective approach IBGSO: in order to improve the search ability and global convergence, we propose a novel optimization-based selective approach IBGSO for the multi-sensor-based HAR framework. Compared with the other three state-of-the-art optimization-based selective approaches, the proposed IBGSO approach can help us to comprehensively understand the crucial positions and sensors for the performance of HAR.
- (3)
- Experimental evaluation: we conduct extensive experiments and obtain several valuable results that can help researchers make better decisions in utilizing sensors and positions for multi-sensor-based HAR.

## 2. Related Works

## 3. Related and Proposed Techniques

#### 3.1. Extreme Learning Machine

#### 3.2. Multi-Sensor Fusion with an Ensemble Learning System

#### 3.3. The Proposed Optimization-Based Selective Approach IBGSO

#### 3.3.1. Glowworm Swarm Optimization

_{i}(t) in the decision domain, threshold n

_{t}for the number of glowworms in the neighborhood, perception radius r

_{s}and move step s.

_{i}(t).

_{ij}(t) of the glowworm X

_{i}(t) moving to the glowworm X

_{j}(t) in its dynamic decision radius by Equation (2):

_{i}(t) by Equation (3):

_{i}(t) by Equation (4):

#### 3.3.2. IBGSO

- (a)
- Bulletin board

- (b)
- Improvement of steps

_{i}(t) will move to. When the position update is performed, the status of the position is changed according to a certain probability. The position update can be expressed mathematically as:

_{1}and p

_{2}∈ [0, 1] are both selected parameters for the update formula, r is a random number between (0, 1) and r

_{0}is the a random number of 0 or 1, k = 1, 2, …, n.

- (c)
- Improvement of search behavior

_{i}(t) respectively moves to the best position in the bulletin board, the optimal position of glowworm in the decision domain and a random position in the decision domain. These positions are marked as x

^{’}

_{i}(t + 1), x

^{’’}

_{i}(t + 1) and x

^{’’’}

_{i}(t + 1). Then, the best one of the x

^{’}

_{i}(t + 1), x

^{’’}

_{i}(t + 1) and x

^{’’’}

_{i}(t + 1) will be the position of x

_{i}(t + 1).

- (d)
- Mutation behavior

_{max}is the maximum number of iterations.

## 4. Optimizing the Sensor Deployment Based on the Proposed IBGSO Selective Ensemble Approach

- (1)
- Obtain the feature set of each activity from different positions. In consideration of the requirements of the performance and efficiency of the HAR system, in this work, the maximum, minimum, mean value, root mean square, standard deviation σ, skewness S, kurtosis K and the signal energy E are utilized as feature construction. Some of these features can be expressed as follows:$$mean=\frac{1}{N}{\displaystyle \sum _{i=1}^{N}{a}_{i}}$$$$\sigma =\sqrt{\frac{1}{N}{\displaystyle \sum _{i=1}^{N}{({a}_{i}-mean)}^{2}}}$$$$K=\frac{1}{N}{\displaystyle \sum _{i=1}^{N}{({a}_{i}-mean)}^{4}/{\sigma}^{4}}$$$$S=\frac{1}{N}{\displaystyle \sum _{i=1}^{N}{({a}_{i}-mean)}^{3}/{\sigma}^{3}}$$$$E={\displaystyle \sum _{i=1}^{N}{\left|{a}_{i}\right|}^{2}}$$$$RMS=\sqrt{\frac{1}{N}({a}_{1}^{2}+{a}_{2}^{2}\cdots +{a}_{N}^{2})}$$
_{i}is the acceleration data, i = 1, 2, …, N. N is the number of data points. After feature extraction, all features were normalized to the interval [0, 1] to eliminate the impact of the range difference. - (2)
- Generate various individual classifiers. The activity data corresponding to the different positions of the body is employed to initially establish the ELMs. Moreover, the aggregating concept is utilized to combine the trained base ELMs. In this work, the ensemble learning model for HAR is, thus, built with multiple basic classifiers corresponding to positions and we utilize the majority voting method to fuse the decision information of different positions of the body.
- (3)
- Select the optimal subset of ELMs by the proposed IBGSO method.After the IBGSO parameter initialization, the optimization process for the optimal ensemble subset begins. This work utilizes a binary encoding method (a combination of 0 and 1), which can represent the state of the base ELMs selection. Let binary strings $C=\{{c}_{1},\text{}{c}_{2},\text{}\cdots ,\text{}{c}_{M}\}$ express the original base ELMs ensemble and M be the number of ELMs. If c
_{i}= 1, then it represents that the ith base ELM is selected; if c_{i}= 0, it indicates that the ith base ELM is not selected. Therefore, the modified IBGSO algorithm can deal with the selective ensemble. For each glowworm, the bits in the binary strings can represent whether the base ELMs corresponding to the poisons will be selected.The sensor layout is optimized to reduce the placement of sensors and improve the performance of the multi-sensor motion recognition system. Therefore, when evaluating the sensor layout, their recognition accuracy is taken as an important reference factor in this work. In addition, we take the scale of the ensemble system (that is, the number of sensors) as another secondary optimization goal, so we introduce a new fitness function as follows:$$fitness=\omega \times {A}_{tr}-(1-\omega )\frac{m}{M}$$_{tr}is the training accuracy, M is the total number of ELMs, m is an integer that satisfies $0<m\le M$ and represents the number of selected ELMs and ω is a weighting factor which is slightly less than 1. If the two ensemble subsets have the same accuracy, the ensemble subset with fewer base ELMs will have a lager fitness value. For each glowworm, the fitness value is calculated as the function (14) and the base classifier combination corresponding to the maximum fitness function will be obtained. - (4)
- Employ the selective ensemble system with optimized sensor layout to HARThe proposed HAR method combines multiple classifiers, which are constructed by activity data from different body positions. Moreover, through the proposed optimization-based classifier selection approach IBGSO, we can reduce the number of sensors and ensure that the system has better recognition performance. Therefore, the proposed HAR method has high practicability, which can realize the optimal performance of multi-sensor system with a minimum number of sensors.

## 5. Datasets and Experimental Setup

#### 5.1. Datasets

#### 5.2. Performance Evaluation

#### 5.3. Experiment Setup

_{t}= 5 and the maximum number of iterations t

_{max}= 300, p

_{1}= 0.15 p

_{2}= 0.85.

## 6. Experimental Results

#### 6.1. Experiment 1: OPPORTUNITY Dataset

#### 6.2. Experiment 2: Daily and Sports Activities Dataset

## 7. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## References

- De, P.; Chatterjee, A.; Rakshit, A. Recognition of human behavior for assisted living using dictionary learning approach. IEEE Sens. J.
**2018**, 18, 2434–2441. [Google Scholar] [CrossRef] - Zhu, C.; Sheng, W. Wearable sensor-based hand gesture and daily activity recognition for robot-assisted living. IEEE Trans. Syst. Man Cybern. Part A-Syst. Hum.
**2011**, 41, 569–573. [Google Scholar] [CrossRef] - Wang, Z.L.; Guo, M.; Zhao, C. Badminton stroke recognition based on body sensor networks. IEEE Trans. Hum. Mach. Syst.
**2016**, 46, 769–775. [Google Scholar] [CrossRef] - Mooney, R.; Corley, G.; Godfrey, A.; Quinlan, L.R.; ÓLaighin, G. Inertial sensor technology for elite swimming performance analysis: A systematic review. Sensors
**2016**, 16, 18. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Akhavian, R.; Behzadan, A.H. Smartphone-based construction workers’ activity recognition and classification. Autom. Constr.
**2016**, 71, 198–209. [Google Scholar] [CrossRef] - Du, Y.; Lim, Y.; Tan, Y. A novel human activity recognition and prediction in smart home based on interaction. Sensors
**2019**, 19, 4474. [Google Scholar] [CrossRef] [Green Version] - Aguileta, A.A.; Brena, R.F.; Mayora, O.; Molino-Minero-Re, E.; Trejo, L.A. Multi-sensor fusion for activity recognition-a survey. Sensors
**2019**, 19, 3808. [Google Scholar] [CrossRef] [Green Version] - Nweke, H.F.; Teh, Y.W.; Mujtaba, G.; Al-garadi, M.A. Data fusion and multiple classifier systems for human activity detection and health monitoring: Review and open research directions. Inf. Fusion
**2019**, 46, 147–170. [Google Scholar] [CrossRef] - Javed, A.R.; Sarwar, M.U.; Khan, S.; Iwendi, C.; Mittal, M.; Kumar, N. Analyzing the effectiveness and contribution of each axis of tri-axial accelerometer sensor for accurate activity recognition. Sensors
**2020**, 20, 2216. [Google Scholar] [CrossRef] [Green Version] - Zhu, C.; Sheng, W. Human daily activity recognition in robot-assisted living using multi-sensor fusion. In Proceedings of the Robotics and Automation, Kobe, Japan, 12–17 May 2009; pp. 2154–2159. [Google Scholar]
- Khan, A.M.; Tufail, A.; Khattak, A.M.; Laine, T.H. Activity recognition on smartphones via sensor-fusion and kda-based svms. Int. J. Distrib. Sensor Netw.
**2014**, 10, 1–14. [Google Scholar] [CrossRef] - Wang, Y.; Cang, S.; Yu, H. A survey on the wearable sensor modality centred human activity recognition in health care. Expert Syst. Appl.
**2019**, 137, 167–190. [Google Scholar] [CrossRef] - Chen, Z.H.; Jiang, C.Y.; Xie, L.H. A novel ensemble ELM for human activity recognition using smartphone sensors. IEEE Trans. Ind. Inf.
**2019**, 15, 2691–2699. [Google Scholar] [CrossRef] - Li, X.Q.; Jiang, H.K.; Niu, M.G.; Wang, R.X. An enhanced selective ensemble deep learning method for rolling bearing fault diagnosis with beetle antennae search algorithm. Mech. Syst. Signal Process.
**2020**, 142, 106752. [Google Scholar] [CrossRef] - Guo, H.; Liu, H.; Li, R.; Wu, C.; Guo, Y.; Xu, M. Margin & diversity based ordering ensemble pruning. Neurocomputing
**2018**, 275, 237–246. [Google Scholar] - Galar, M.; Fernández, A.; Barrenechea, E.; Bustince, H.; Herrera, F. Ordering-based pruning for improving the performance of ensembles of classifiers in the framework of imbalanced datasets. Inf. Sci.
**2016**, 354, 178–196. [Google Scholar] [CrossRef] - Zhang, T.; Dai, Q.; Ma, Z. Extreme learning machines’ ensemble selection with GRASP. Appl. Intell.
**2015**, 43, 439–459. [Google Scholar] [CrossRef] - Yu, J.; Yang, M. Deterministic annealing Gustafson-Kessel fuzzy clustering algorithm. Inf. Sci.
**2017**, 417, 435–453. [Google Scholar] - Nyathi, T.; Pillay, N. Comparison of a genetic algorithm to grammatical evolution for automated design of genetic programming classification algorithms. Expert Syst. Appl.
**2018**, 104, 213–234. [Google Scholar] [CrossRef] - Chen, Y.; Li, L.; Xiao, J.; Yang, Y.; Liang, J.; Li, T. Fault diagnosis for rotary machinery with selective ensemble neural networks. Mech. Syst. Signal Process.
**2018**, 113, 112–130. [Google Scholar] - Engin, O.; Güçlü, A. A new hybrid ant colony optimization algorithm for solving the no-wait flow shop scheduling problems. Appl. Soft Comput.
**2018**, 72, 166–176. [Google Scholar] [CrossRef] - Ding, S.; An, Y.; Zhang, X.; Wu, F.; Xue, Y. Wavelet twin support vector machines based on glowworm swarm optimization. Neurocomputing
**2017**, 225, 157–163. [Google Scholar] [CrossRef] - Cao, J.J.; Li, W.F.; Ma, C.C.; Tao, Z.W. Optimizing multi-sensor deployment via ensemble pruning for wearable activity recognition. Inf. Fusion.
**2018**, 41, 68–79. [Google Scholar] [CrossRef] - Chen, C.; Jafari, R.; Kehtarnavaz, N. Improving human action recognition using fusion of depth camera and inertial sensors. IEEE Trans. Hum. Mach. Syst.
**2015**, 45, 51–61. [Google Scholar] [CrossRef] - Dong, Y.L.; Li, X.D.; Dezert, J.; Khyam, M.O.; Noor-A-Rahim, M.; Ge, S.S. Dezert-Smarandache theory-based fusion for human activity recognition in body sensor networks. IEEE Trans. Ind. Inform.
**2020**, 16, 7138–7149. [Google Scholar] [CrossRef] - Boutellaa, E.; Kerdjidj, O.; Ghanem, K. Covariance matrix based fall detection from multiple wearable sensors. J. Biomed. Inform.
**2019**, 94, 103189. [Google Scholar] [CrossRef] - Guo, M.; Wang, Z.L.; Yang, N.; Li, Z.L.; An, T.T. A Multisensor multiclassifier hierarchical fusion model based on entropy weight for human activity recognition using wearable inertial sensors. IEEE Trans. Hum. Mach. Syst.
**2019**, 49, 105–111. [Google Scholar] [CrossRef] - Gibson, R.M.; Amira, A.; Ramzan, N.; Casaseca-de-la-Higuera, P.; Pervez, Z. Multiple comparator classifier framework for accelerometer-based fall detection and diagnostic. Appl. Soft Comput.
**2016**, 39, 94–103. [Google Scholar] [CrossRef] - Abd Rahim, K.N.K.; Elamvazuthi, I.; Izhar, L.I.; Capi, G. Classification of human daily activities using ensemble methods based on smartphone inertial sensors. Sensors
**2018**, 18, 4132. [Google Scholar] [CrossRef] [Green Version] - Chowdhury, A.K.; Tjondronegoro, D.; Chandran, V.; Trost, S.G. Ensemble methods for classification of physical activities from wrist accelerometry. Med. Sci. Sports Exerc.
**2017**, 49, 1965–1973. [Google Scholar] [CrossRef] [Green Version] - Huang, G.B.; Zhu, Q.Y.; Siew, C.K. Extreme learning machine: Theory and applications. Neurocomputing
**2006**, 70, 489–501. [Google Scholar] [CrossRef] - Krishnanand, K.N.; Ghose, D. Glowworm swarm optimisation: A new method for optimizing multi-modal functions. Int. J. Comput. Intell. Stud.
**2009**, 1, 93–119. [Google Scholar] [CrossRef] - Zhou, Z.H.; Wu, J.; Tang, W. Ensembling neural networks: Many could be better than all. Artif. Intell.
**2002**, 137, 239–263. [Google Scholar] [CrossRef] [Green Version] - Singhal, P.K.; Naresh, R.; Sharma, V. Binary fish swarm algorithm for profit-based unit commitment problem in competitive electricity market with ramp rate constraints. IET Gener. Transm. Distrib.
**2015**, 9, 1697–1707. [Google Scholar] [CrossRef] - Ni, Z.; Zhang, C.; Ni, L. A haze forecast method of selective ensemble based on glowworm swarm optimization algorithm. Int. J. Pattern. Recognit. Artif. Intell.
**2016**, 29, 143–153. [Google Scholar]

**Figure 4.**The framework of multi-sensor-based human activity recognition (HAR) with an improved binary glowworm swarm optimization (IBGSO) selective ensemble.

**Figure 5.**Relationship between the fitness value of the heuristic algorithms and the iterations using the OPPORTUNITY dataset.

**Figure 6.**Confusion matrices for the ensemble all approach (

**a**) and the proposed IBGSO-based ensemble approach (

**b**) using the OPPORTUNITY dataset.

**Figure 7.**Relationship between the fitness value of the heuristic algorithms and iterations using the DSA.

**Figure 8.**Confusion matrices for the ensemble all approach (

**a**) and the proposed IBGSO-based ensemble approach (

**b**) using the DSA.

No. | Position/Type | No. | Position/Type | No. | Position/Type |
---|---|---|---|---|---|

S1 | RKNˆ/Acc | S15 | IMU BACK/Magn | S29 | IMU LLA/Acc |

S2 | HIP/Acc | S16 | IMU BACK/Quat | S30 | IMU LLA/Gyro |

S3 | LUAˆ/Acc | S17 | IMU RUA/Acc | S31 | IMU LLA/Magn |

S4 | RUA/Acc | S18 | IMU RUA/Gyro | S32 | IMU LLA/Quat |

S5 | LH/Acc | S19 | IMU RUA/Magn | S33 | IMU L-SHOE/Eu |

S6 | BACK/Acc | S20 | IMU RUA/Quat | S34 | IMU L-SHOE/Nav |

S7 | RKN_/Acc | S21 | IMU RLA/Acc | S35 | IMU L-SHOE/Body |

S8 | RWR/Acc | S22 | IMU RLA/Gyro | S36 | IMU L-SHOE/AngVelBodyFrame |

S9 | RUAˆ/Acc | S23 | IMU RLA/Magn | S37 | IMU L-SHOE/AngVelNavFrame |

S10 | LUA_/Acc | S24 | IMU RLA/Quat | S38 | IMU R-SHOE/Eu |

S11 | LWR/Acc | S25 | IMU LUA/Acc | S39 | IMU R-SHOE/Nav |

S12 | RH/Acc | S26 | IMU LUA/Gyro | S40 | IMU R-SHOE/Body |

S13 | IMU BACK/Acc | S27 | IMU LUA/Magn | S41 | IMU R-SHOE/AngVelBodyFrame |

S14 | IMU BACK/Gyro | S28 | IMU LUA/Quat | S42 | IMU R-SHOE/AngVelNavFrame |

**Table 2.**The sensor types and their body positions in the daily and sports activities dataset (DSA).

No. | Pos/Typ | No. | Pos/Typ | No. | Pos/Typ | No. | Pos/Typ | No. | Pos/Typ |
---|---|---|---|---|---|---|---|---|---|

S1 | T_xacc | S10 | RA_xacc | S19 | LA_xacc | S28 | RL_xacc | S37 | LL_xacc |

S2 | T_yacc | S11 | RA_yacc | S20 | LA_yacc | S29 | RL_yacc | S38 | LL_yacc |

S3 | T_zacc | S12 | RA_zacc | S21 | LA_zacc | S30 | RL_zacc | S39 | LL_zacc |

S4 | T_xgyro | S13 | RA_xgyro | S22 | LA_xgyro | S31 | RL_xgyro | S40 | LL_xgyro |

S5 | T_ygyro | S14 | RA_ygyro | S23 | LA_ygyro | S32 | RL_ygyro | S41 | LL_ygyro |

S6 | T_zgyro | S15 | RA_zgyro | S24 | LA_zgyro | S33 | RL_zgyro | S42 | LL_zgyro |

S7 | T_xmag | S16 | RA_xmag | S25 | LA_xmag | S34 | RL_xmag | S43 | LL_xmag |

S8 | T_ymag | S17 | RA_ymag | S26 | LA_ymag | S35 | RL_ymag | S44 | LL_ymag |

S9 | T_zmag | S18 | RA_zmag | S27 | LA_zmag | S36 | RL_zmag | S45 | LL_zmag |

NO. | Activity | NO. | Activity | NO. | Activity |
---|---|---|---|---|---|

A1 | Sitting | A8 | Moving around | A15 | Cycling on an exercise bike in a horizontal position |

A2 | Standing | A9 | Walking in a parking | A16 | Cycling on an exercise bike in a vertical position |

A3 | Lying on back | A10 | Walking on a treadmill(4 km/h, flat) | A17 | Rowing |

A4 | Lying on right side | A11 | Walking on a treadmill(4 km/h, inclined positions) | A18 | Jumping |

A5 | Ascending stairs | A12 | Running on a treadmill (8 km/h) | A19 | Playing basketball |

A6 | Descending stairs | A13 | Exercising on a stepper | ||

A7 | Standing in an elevator | A14 | Exercising on a cross trainer |

Run | GA | BAFSA | BGSO | IBGSO |
---|---|---|---|---|

1 | 1,4,7,9,10,13,16,17,19,20,22,25,27,35,39,40 | 1,4,6,9,10,12,14,17,19,21,25,27,27,35 | 1,7,9,13,16,17,20,23,31,37,39 | 1,7,9,13,16,17,23,25,31 |

2 | 1,9,11,13,25,16,18,20,22,23,27,35,38,40, | 2,5,9,10,13,16,20,22,25,31,40 | 1,7,9,12,17,20,23,25,27,29,31,37 | 1,7,9,13,17,23,29,31,35,37.39 |

3 | 1,2,4,5,6,9,16,17,18,21,23,27,29,31,36,39,40, | 1,3,7,9,16,17,21,25,28,31,35,38,40 | 1,5,7,9,12,17,20,22,23,25,27,29 | 1,5,7,9,13,16,17,21,25,27,37,39 |

4 | 1,7,8,12,13,16,17,20,23,28,31,35,39 | 1,4,6,7,9,10,12,15,17,19,22,24,28,31,40 | 1,4,5,7,9,16,17,20,23,27,35,37 | 1,3,5,7,8,16,17,20,23,25,27,35,37 |

5 | 2,5,9,12,17,19,21,25,27,28,31,33,36 | 2,6,9,19,12,14,16,17,21,23,25,27,28,35,37 | 1,7,9,12,16,17,20,22,31,35,37,39 | 1,5,7,13,16,17,22,23,27,31,35,37 |

Run | GA | BAFSA | BGSO | IBGSO |
---|---|---|---|---|

1 | 1,2,4,7,10,13,15,17,19,20,23,25,28,29,31,34 | 2,3,6,7,10,12,13,17,18,19,23,25,29,31 | 1,3,6,7,10,13,21,25,27,31,35 | 1,2,3,7,10,13,25,28,29,31 |

2 | 1,2,3,7,10,13,17,18,21,25,27,28,29,31,34 | 1,2,3,7,10,13,17,25,27,29,31 | 1,7,10,13,17,23,25,27,28,29,31 | 1,5,7,10,13,17,21,25,27,28,31 |

3 | 1,3,6,7,9,12,14,16,18,19,25,27,29,31,35 | 1,2,3,9,10,16,25,27,28,29,35,37,38 | 1,3,5,10,12,13,17,19,25,28,29 | 1,2,3,7,13,25,27,29,31 |

4 | 1,2,6,7,10,13,14,16,18,25,27,28,29,31,35 | 1,2,7,9,10,13,17,21,25,27,29,31,35,38 | 1,4,7,9,16,17,20,23,27,35 | 2,3,5,7,10,13,21,27,31,35 |

5 | 1,2,4,7,9,10,13,16,19,22,25,27,28,29,31,35, | 1,2,4,5,7,9,10,13,16,19,25,27,28,31,34,35 | 1,3,7,10,13,17,21,25,28,29 | 1,2,3,10,13,17,25,27,28 |

**Table 6.**Accuracy comparison of the four subjects for the five approaches using the OPPORTUNITY dataset.

Method | Subject 1 | Subject 2 | Subject 3 | Subject 4 |
---|---|---|---|---|

Ensemble all | 0.932 | 0.927 | 0.912 | 0.877 |

GA | 0.862 | 0.861 | 0.865 | 0.824 |

BAFSA | 0.918 | 0.910 | 0.876 | 0.864 |

BGSO | 0.907 | 0.896 | 0.913 | 0.892 |

IBGSO | 0.939 | 0.923 | 0.926 | 0.916 |

Method | Subject 1 | Subject 2 | Subject 3 | Subject 4 |
---|---|---|---|---|

Ensemble all | 0.928 | 0.937 | 0.927 | 0.916 |

GA | 0.911 | 0.873 | 0.898 | 0.866 |

BAFSA | 0.927 | 0.923 | 0.948 | 0.918 |

BGSO | 0.938 | 0.935 | 0.937 | 0.934 |

IBGSO | 0.954 | 0.929 | 0.952 | 0.949 |

Method | Accuracy | F1 | Ensemble Size |
---|---|---|---|

Ensemble all | 0.912 | 0.927 | 45 |

GA | 0.853 | 0.887 | 15.4 |

BAFSA | 0.892 | 0.929 | 13.6 |

BGSO | 0.902 | 0.936 | 12 |

IBGSO | 0.926 | 0.946 | 10.8 |

Run | GA | BAFSA | BGSO | IBGSO |
---|---|---|---|---|

1 | 1,3,5,6,9,10,12,16,18,19,21,22,23,25,28,37,39,43, | 1,2,5,7,10,11,16,17,19,22,28,37,38,40,42 | 1,2,3,5,10,12,15,19,20,28,30,37,38 | 1,2,3,5,10,11,17,19,24,29,30,37,40 |

2 | 1,3,5,6,7,8,12,13,16,19,21,24,27,30,35,36,38,40,43 | 1,3,5,7,8,10,13,19,20,22,29,30,37,38,39,42,44 | 1,2,3,6,10,11,14,19,20,28,29,31,37 | 1,3,6,7,10,11,19,20,21,28,38,39,42 |

3 | 1,2,4,5,6,9,16,17,18,21,23,27,29,31,36,39,40, | 1,5,7,6,10,12,13,15,19,22,28,29,37 | 1,3,5,10,12,16,18,19,20,22,29,31,37,38 | 1,2,3,5,6,10,12,17,18,20,21,28,29,34,39 |

4 | 2,3,7,8,9,12,15,17,20,25,27,29,37,38,40,42,43 | 1,2,4,5,6,10,12,15,16,19,20,28,37,38,42 | 1,2,4,5,10,19,20,26,28,30,37,39,42,44 | 1,3,5,7,9,10,13,15,19,24,29,32,37,39,42 |

5 | 1,2,5,6,9,13,15,17,19,22,25,27,28,30,37,38,42,44 | 1,3,5,8,9,10,13,19,20,23,25,29,31,37,39,40,42 | 1,2,3,4,9,10,12,19,21,28,29,30,37,38,41,44 | 1,2,4,7,10,13,19,20,21,22,27,29,37,39,42 |

Run | GA | BAFSA | BGSO | IBGSO |
---|---|---|---|---|

1 | 1,2,3,7,6,9,11,12,17,18,20,21,24,26,27,29,32,37,38,42 | 1,2,4,7,8,9,10,11,15,18,20,23,27,29,33,37,38,40 | 1,2,4,5,11,12,13,15,18,20,21,27,31,37 | 1,2,3,6,7,10,11,16,19,22,26,28,30 |

2 | 1,2,3,4,5,7,9,10,12,16,17,20,23,25,27,30,33,35,38,42,43 | 1,3,6,7,8,9,10,11,14,16,19,20,22,28,29,30,33,38,41,44 | 1,3,5,8,9,11,13,16,17,20,28,30,33,37,38 | 1,2,4,6,7,8,10,11,16,19,21,26,29,37 |

3 | 1,2,3,4,5,7,10,14,18,19,20,23,26,28,30,35,37,39,40 | 1,5,8,9,11,15,17,19,20,21,28,29,37 | 2,3,5,6,7,11,13,15,18,28,29,34,37,39 | 1,2,3,5,7,9,10,11,12,15,19,21,29,37 |

4 | 1,2,5,7,8,9,11,14,17,21,25,23,26,28,29,31,33,35,40,42,43 | 1,2,3,5,8,10,12,19,21,23,26,28,29,31,37,39 | 1,2,4,5,10,19,20,26,28,30,37,39,42,44 | 1,2,3,4,6,9,10,19,21,28,35,37,39 |

5 | 1,2,4,6,8,12,16,17,18,21,24,27,29,32,34,35,37,38,42,44 | 1,3,4,6,8,9,11,17,18,19,22,24,26,28,29,36,38,40,42 | 1,2,3,4,10,12,19,21,22,28,29,30,37,38,41,44 | 1,2,5,7,9,10,12,15,21,22,26,28,32,35,37,39 |

**Table 11.**Accuracy comparison of the four randomly selected subjects for the five approaches using the DSA.

Method | Subject 1 | Subject 2 | Subject 3 | Subject 4 |
---|---|---|---|---|

Ensemble all | 0.856 | 0.805 | 0.816 | 0.831 |

GA | 0.745 | 0.675 | 0.707 | 0.729 |

BAFSA | 0.775 | 0.736 | 0.765 | 0.752 |

BGSO | 0.821 | 0.784 | 0.799 | 0.764 |

IBGSO | 0.865 | 0.837 | 0.818 | 0.848 |

**Table 12.**F1 comparison of the four randomly selected subjects for the five approaches using the DSA.

Method | Subject 1 | Subject 2 | Subject 3 | Subject 4 |
---|---|---|---|---|

Ensemble all | 0.874 | 0.821 | 0.836 | 0.865 |

GA | 0.787 | 0.702 | 0.748 | 0.771 |

BAFSA | 0.842 | 0.729 | 0.807 | 0.762 |

BGSO | 0.864 | 0.827 | 0.818 | 0.819 |

IBGSO | 0.912 | 0.854 | 0.842 | 0.892 |

Method | Accuracy | F1 | Ensemble Size |
---|---|---|---|

Ensemble all | 0.827 | 0.849 | 45 |

GA | 0.714 | 0.752 | 18.6 |

BAFSA | 0.757 | 0.785 | 16.2 |

BGSO | 0.792 | 0.832 | 15.8 |

IBGSO | 0.842 | 0.875 | 13.4 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2020 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/).

## Share and Cite

**MDPI and ACS Style**

Tian, Y.; Zhang, J.
Optimizing Sensor Deployment for Multi-Sensor-Based HAR System with Improved Glowworm Swarm Optimization Algorithm. *Sensors* **2020**, *20*, 7161.
https://doi.org/10.3390/s20247161

**AMA Style**

Tian Y, Zhang J.
Optimizing Sensor Deployment for Multi-Sensor-Based HAR System with Improved Glowworm Swarm Optimization Algorithm. *Sensors*. 2020; 20(24):7161.
https://doi.org/10.3390/s20247161

**Chicago/Turabian Style**

Tian, Yiming, and Jie Zhang.
2020. "Optimizing Sensor Deployment for Multi-Sensor-Based HAR System with Improved Glowworm Swarm Optimization Algorithm" *Sensors* 20, no. 24: 7161.
https://doi.org/10.3390/s20247161