1 s2.0 S0952197621003869 Main

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Engineering Applications of Artificial Intelligence 107 (2022) 104538

Contents lists available at ScienceDirect

Engineering Applications of Artificial Intelligence


journal homepage: www.elsevier.com/locate/engappai

A novel feature based ensemble learning model for indoor localization of


smartphone users
Ayan Kumar Panja a,b , Syed Fahim Karim a , Sarmistha Neogy b , Chandreyee Chowdhury b ,∗
a
Institute of Engineering & Management, Kolkata, India
b
Jadavpur University, Kolkata, India

ARTICLE INFO ABSTRACT


Keywords: For WiFi-based indoor localization, optimal selection of features leads to the increased perceptibility of the
RSS localization procedure. It is essential to capture the important sets of Access Points (APs) that best defines
Sustainability the floor map for the positioning process. To maintain sustainable localization, the selection of APs enables
Feature selection
scaling the solution and reducing the maintenance cost. In the present work, our contribution is twofold-
Metaheuristics
the power of Particle Swarm Optimization is utilized for the selection of important APs. Then, a feature-
Ensemble learning
Indoor localization
based ensemble model is designed for the selected subsets of APs to retain the generality of localization
performance. The base learners capture the different ambiance in the training and testing process. Extensive
experimentation was carried out using the collected dataset from multiple smartphone devices. The proposed
feature selection and training pipeline has also been tested with two popular benchmark datasets- UJIIndoorLoc
and JUIndoorLoc. Results indicate that the proposed feature-based ensemble model could achieve 86%–96%
accuracy with around 50%–65% reduction in APs for the datasets. The mean absolute error (MAE) indicates
the distance between the predicted and actual location points. It is found to be 2.68 m, that is, neighboring
location points, which is quite acceptable for user localization in indoor spaces.

1. Introduction Researches in the domain of RSS based positioning has been focused
on the collection and formation of the radio map database followed by
Positioning is one of the important and promising sectors whose up-gradation and selection of positioning algorithm as in Huang et al.
applications in both indoor and outdoor environments are transforming (2020), Li et al. (2018) and Abbas et al. (2019).
the industries and bringing in new business models in the present smart The localization accuracy highly depends on the environment char-
era. In the present smart city paradigm, indoor positioning applications acteristics. Numerous factors, such as the nature of the floormap,
are widely used in the domain of sensor networks (Hu et al., 2018), number of walls, presence of objects, humidity, etc. affect the signal
Robotics (Noonan et al., 2018), Augmented reality (Kim and Jun, reading from the WiFi Access Points (APs). APs with strong signal
2008), Navigation System (Kunhoth et al., 2020). The global position- strength provides better reliability in the positioning process while
ing system (GPS) is the most essential tool for outdoor positioning. weak signals barely show distance sensitivity. Thus, the selection of
However, due to building construction materials, substantial power is the combination of APs significantly affects the localization process.
lost, so the accuracy of GPS decreases in the indoor environment. Hence, feature selection plays a vital role in retaining the critical set of
Hence, the potential of ambient technologies is majorly explored to attributes or access points that significantly contribute to localization
provide user location and context cues in an indoor platform. Machine and reduce the computation overhead. Generally, the APs for a partic-
learning approaches on a network of deployed sensors could be utilized ular floor are selected based on the criteria, such as signal strength,
for localization as in Cottone et al. (2016). Pedestrian Dead Reckoning information gain, fingerprint clustering, and the like (Salamah et al.,
is an approach that has been found to be reported in existing works for 2016). Generally approaches focus on clustering the regions into sub-
extracting movement trails of individual users using their smartphone regions and considering criteria such as information gain and power from
inertial sensors (Racko et al., 2018). Pervasive technologies such as APs as the basis for selection (Jiang et al., 2015; Huang et al., 2020).
WiFi, Bluetooth have primarily been used in Received Signal Strength The defined techniques are suitable for a static floorplan. However, it
(RSS) based localization where the users are generally spotted on a is not always true that a single AP would provide a stable Received
floorplan for each time instant.
Signal Strength Indicator (RSSI) value over all of the selected areas

∗ Corresponding author.
E-mail address: chandreyee.chowdhury@jadavpuruniversity.in (C. Chowdhury).

https://doi.org/10.1016/j.engappai.2021.104538
Received 12 December 2020; Received in revised form 5 August 2021; Accepted 31 October 2021
Available online 11 November 2021
0952-1976/© 2021 Elsevier Ltd. All rights reserved.
A.K. Panja, S.F. Karim, S. Neogy et al. Engineering Applications of Artificial Intelligence 107 (2022) 104538

under any ambient condition. So, the optimal selection of APs is an framework combined with a probabilistic model for localization. How-
NP-hard problem. Thus, to develop a sustainable positioning scheme ever, collecting a sufficient number of fingerprints for varied conditions
for any generalized floor, the use of a metaheuristic approach can be a is challenging in reality. In order to capture such variations, ensemble-
propitious solution. Through exploration and exploitation, the local, as based approaches are a plausible solution. In Taniuchi and Maekawa
well as the global best selection of APs, could be found. (2014), the use of decision tree and random forest as base learners
In this work, we have proposed a novel positioning strategy for can be observed where the commonly used bagging and boosting based
smartphone users using Binary Particle Swarm Optimization (BPSO) approaches are applied. An ensemble approach built for user’s position
based AP selection and defining a feature-based ensemble model to estimation by calculating the probability estimate of heterogeneous
cover different ambient variations. We have observed from the past classifiers is presented in Belmonte-Fernandez et al. (2018). A novel
research that Particle Swarm Optimization (PSO) has been used in ensemble approach proposed by Roy et al. in Roy et al. (2020) uti-
solving the AP placement problem (Chen and Zou, 2017; Du and lizes Dempster–Shafer belief theory that takes various context into
Yang, 2016) for WiFi-based indoor positioning and are reported to give consideration while training the base learners.
significant accuracy than other approaches. The placement of AP well We have listed some of the notable works carried out for the
aligns with the problem of AP selection. The motive behind using a AP selection procedure. One of the very first signal strength-based
BPSO approach is to find the local and global best selection of APs that approaches in AP selection was given by Youssef et al. in Youssef
leads to better exploration and selection. In the majority of the floor et al. (2003) utilizing joint clustering approach that utilizes maximum
plans selected for positioning, some APs are found to impart similar likelihood estimation based on the RSS values received from the APs.
information to localization, that is they are highly correlated w.r.t a Jiang et al. in Jiang et al. (2015) proposed a selection of APs based
given training context. Thus, there can be more than one global optimal on the signal levels; the claimed accuracy was appreciable, which
selection of APs for that context. With different ambient conditions and worked perfectly for a big room. In Chen et al. (2006), the authors
devices, the context varies during testing. Hence, to retain generality have utilized the clustering and decision tree-based approach in the
irrespective of context, we have developed a feature-based ensemble selection of the APs. The authors proposed an offline AP selection and
approach. The feature-based ensemble classifier is proposed based on have studied the effect of selection on four criteria: MaxMean, Infogain,
the important feature subsets obtained by the use of the BPSO approach RndMean, and ReverseInfogain. Infogain is the selection performed in
to perform positioning. In summary, the following are the contribution descending order of APs with respect to the information gain from
of the work; the APs, ReverseInfogain is the reverse of Infogain where the APs are
selected in the reverse manner in which Infogain is used for selection.
1. BPSO based feature selection technique is proposed for smart- APs are ranked in descending order of their average RSS following
phone based Indoor Positioning. the MaxMean criterion. RndMean criterion is based on random AP
2. Based on the selected feature sets, a feature based ensemble selection regardless of the RSS values from the APs. The authors have
model is designed. A neural network based meta model classifies claimed to have achieved appreciable accuracy with Infogain criteria
the test instances based on the prediction outcomes of the base for a hall by taking a subset of APs. Clustering-based approaches are
learners. applied to divide the regions into clusters and select the best set
3. The proposed BPSO based feature selection approach is tested of APs for the particular cluster. A similar region-based clustering
for accuracy against our collected real-life dataset and chosen and AP selection approach based on Infogain correction is proposed
benchmark sets. The proposed training pipeline has been tested in Huang et al. (2020). Hybrid Positioning combining one methodology
for location independence. with another is also applied in feature extraction procedure (Wang
et al., 2020). The authors have developed a Fisher score-stacked sparse
The paper is organized in the following manner. State-of the art works autoencoder to extract features followed by a hybrid positioning. The
are summarized in Section 2. Section 3 gives an overview of the BPSO hybrid positioning works on the selected set of APs by dividing the
approach. In Section 4, the AP selection mechanism using metaheuristic region into sub-regions with the help of Fuzzy C-Means Clustering.
based approach is discussed followed by the detailing of the proposed The approach has been compared and tested with feature selection
feature based ensemble approach. The experimental set-up along with based on Principal Component Analysis (PCA) (Salamah et al., 2016)
extensive experimentation and results are discussed in Section 5. The and autoencoders (Feng and Duarte, 2018). The approach gives better
work concludes in Section 6 with future scope of action discussed in results both in terms of accuracy and error deviation. However, the
Section 7. approach is not yet suitable for real-time positioning, as claimed by the
author. In Zhao et al. (2010), AP selection was made considering the
2. Related work correlation of APs. The correlation is calculated by estimating the AP’s
divergence measure. In Roy et al. (2019b) the authors have shown the
For any RSS based approach site survey has to be extensively carried importance of detecting stable APs across different granularity levels.
out to form the RSS database. An approach to rapid site survey is The above-provided work gives us a glimpse of the various ap-
carried in the work (Ficco, 2014) by Ficco et al. They have utilized proaches opted for the selection of APs. In this proposed work, the AP
a distance-based approach for the calibration and formation of the selection problem is addressed considering exploration and exploitation
radio map dataset. Another distance-based approach is given by Li for various context. This is achieved by capturing the important subsets
et al. in Li et al. (2018). They have utilized Bluetooth beacons for the of APs with metaheuristic based approach and constructing a feature
positioning procedure. As RSS is prone to fluctuation, the RSS values based ensemble pipeline for the training process.
can be corrected and calibrated using Kalman Filter (Feng et al., 2020).
Machine learning algorithms are also widely used for indoor posi- 3. Binary particle swarm optimization overview
tioning. The authors in Feng et al. (2020) have used a neural network
whose weights are optimized using PSO for producing a mapping Swarm intelligence (SI) is a behavior of self-organized systems that
between RSSI and distance. The estimated distance is used for the po- is decentralized and collectively takes place. PSO (Ma et al., 2018)
sitioning approach. The deep learning-based approach is gaining much is one such approach which is an evolutionary meta heuristic-based
importance in the field of positioning. WiDeep (Abbas et al., 2019) procedure. Binary PSO is a variant of naive PSO where every particle
is a recently developed deep learning-based framework for indoor is a candidate solution to the selection problem. Every particle has a
positioning. The authors have claimed that their approach captures position vector to hold the current selection of WiFi AP. In the PSO
the correlation between selected WiFi APs leveraging a deep learning approach, there are two update rules, the velocity update function

2
A.K. Panja, S.F. Karim, S. Neogy et al. Engineering Applications of Artificial Intelligence 107 (2022) 104538

responsible for the speed and direction of the particles and the particle’s
position update function. In BPSO, the update rule is a bit different as
we are dealing with binary values. A generalized velocity update rule is
(𝑡)
given in Eq. (1). Let 𝑃𝑖,𝑗 be the vector for position or selection of the 𝑖th
(𝑡)
particle for a generalized BPSO representation at iteration 𝑡. Let 𝑣𝑒𝑙𝑖,𝑗
be the velocity value of the 𝑗th position of the 𝑖th particle at iteration
𝑡 which can be initialized to 0 or random values for each particle of
the swarm. 𝑃 𝑏𝑒𝑠𝑡𝑖,𝑗 and 𝐺𝑏𝑒𝑠𝑡 are generalized forms of a particle’s best
selection and global best selection vectors. The velocity update is as
follows. Fig. 1. Block diagram depicting the vectors involved in the BPSO procedure.

𝑣𝑒𝑙𝑖(𝑡) = 𝑣𝑒𝑙𝑖(𝑡−1) × 𝑊 + 𝑐1 × 𝑟1 × (𝐺𝑏𝑒𝑠𝑡(𝑡−1) − 𝑃𝑖(𝑡−1) )


(1) Table 1
+𝑐2 × 𝑟2 × (𝑃 𝑏𝑒𝑠𝑡(𝑡−1)
𝑖 − 𝑃𝑖(𝑡−1) ) BPSO feature selection terminologies.

The position update rule for the particles is as follows. Variables Significance
𝑀′ Number of APs after columns with SD = 0 removed
(𝑡) 1
𝑠𝑖𝑔𝑚𝑜𝑖𝑑(𝑣𝑒𝑙𝑖,𝑗 )= (𝑡)
(2) 𝑁′ Number of instances in preprocessed radiomap
−𝑣𝑒𝑙𝑖,𝑗 𝑅′𝑢,𝑣 Preprocessed radio map database; 1 ≤ 𝑢 ≤ 𝑁 ′ and 1 ≤ 𝑣 ≤ 𝑀 ′
1+𝑒
{ (𝑡) 𝑝𝑆𝑖𝑧𝑒 Swarm size or population size
(𝑡) 1, if rand() ≤ 𝑠𝑖𝑔𝑚𝑜𝑖𝑑(𝑣𝑒𝑙𝑖,𝑗 ) 𝑃𝑖 Particle object vector
𝑃𝑖,𝑗 = (𝑡) (3)
0, if rand() > 𝑠𝑖𝑔𝑚𝑜𝑖𝑑(𝑣𝑒𝑙𝑖,𝑗 ) 𝑃𝑖 .𝑓 𝑒𝑎𝑡𝑢𝑟𝑒 Current selection of APs (binary vector) by 𝑖th particle
𝑃𝑖 .𝑣𝑒𝑙 Velocity vector of particle 𝑖
Like PSO, an estimation of cost or a fitness function is formulated to 𝐺𝑏𝑒𝑠𝑡 Global best selection of AP (binary vector)
decide about the applicability of the selection/position update rule 𝑃𝑖 .𝑃 𝑏𝑒𝑠𝑡 Local best AP selection vector (binary vector) by particle 𝑖
(Eq. (3)) in BPSO for a better solution. The 𝑟𝑎𝑛𝑑() function generates 𝐺𝐵𝐹 Global best fitness
𝐶𝑣1,𝑣2 Pearson correlation coefficient between 𝑣1 and 𝑣2 AP
a pseudo-random number which is taken from a uniform distribution 𝑏𝑐𝑜𝑢𝑛𝑡 Feature base learner count
in the range of 0 to 1. Leaders are chosen among the particles which 𝑐1 Social acceleration coefficient,
have a better fitness score. They indicate the likelihood of a good 𝑐2 Cognitive acceleration coefficient
solution. The PSO approach has variants that are distinguished by its 𝑚𝑎𝑥𝐼𝑡𝑒𝑟 Maximum iteration
𝑎𝑣𝑔𝐹 Average fitness score of all the particles
initialization and weight parameters. The initialization of the particle
𝜖 Threshold for convergence
vectors greatly impacts the performance of the process. Initialization
can be random or based upon some analysis like opposition based
initialization (Shahzad et al., 2009), chaotic approach (Dong et al.,
2016), and so on. Exploration and exploitation of the swarm can be with their significance. In Fig. 1, a block diagram is shown to present
controlled by the weight parameter along with the social and cogni- an overview of the vectors involved in the process. 𝑃 represents the
tive components. These are essential for finding the unknown global swarm object vector where each index of 𝑃 pertains to a particle object,
optimal solution. referenced as 𝑃𝑖 . The particle count or the swarm population is referred
to with variable 𝑝𝑆𝑖𝑧𝑒. Each particle is represented by a candidate
4. Proposed approach solution, that is, the current selection of APs denoted in binary vector
form as, 𝑃𝑖 .𝑓 𝑒𝑎𝑡𝑢𝑟𝑒[𝑗]. Velocity vector of a particle, 𝑃𝑖 .𝑣𝑒𝑙[𝑗] signifies
The BPSO based feature selection algorithm is presented first, fol- the process of updation of a selection in order to attain optimality.
lowed by the description of the feature based ensemble. The system 𝑃𝑖 .𝑓 𝑒𝑎𝑡𝑢𝑟𝑒 is a binary vector where a random initial selection is as-
model used in this work is as follows. signed; 1 denotes the selection of the WiFi AP, and 0 indicates that
The floorplan 𝐹 is divided into virtual grids of equal-sized blocks the AP is not selected. 𝑃𝑖 .𝑃 𝑏𝑒𝑠𝑡 gives the local best selection of APs by
represented as 𝐿𝑧,𝑥,𝑦 , where (𝑥, 𝑦) are the grid coordinates and 𝑧 is the particle 𝑖, and 𝐺𝑏𝑒𝑠𝑡 is the global best selection of APs. Here 𝑖 is iterated
floor number. The radiomap vector contains the collected RSS values from 1 to 𝑝𝑆𝑖𝑧𝑒 and 𝑗 from 1 to 𝑀 ′ .
from all the registered APs on the floor. The radiomap vector 𝑅 is The proposed selection procedure is demonstrated using a flowchart
denoted as ⟨𝑟𝑠𝑠𝑢1 , 𝑟𝑠𝑠𝑢2 , … .𝑟𝑠𝑠𝑢𝑀 |𝐿𝑧,𝑥,𝑦 ⟩, where 𝑢 represents the 𝑢th row given in Fig. 2. The BPSO based feature selection procedure is carried
of the fingerprint vector; 𝑢 is varied from 1 to 𝑁, that is the no. of out for 𝑘 number of iterations to capture 𝑘 combinations of feature
instances. 𝑀 is the number of detected APs and 𝑟𝑠𝑠𝑢𝑣 denotes the RSSI sets. For every run of the BPSO, the velocity calculation and the
fingerprint value of 𝐴𝑃𝑣 (𝑣 ∈ 1...𝑀). The collected radiomap data is particle’s selection update rule are iterated for 𝑚𝑎𝑥𝐼𝑡𝑒𝑟 times or un-
preprocessed, which is discussed vividly in Section 5.1. For instance, til convergence. The difference (𝑎𝑣𝑔𝐹 − 𝐺𝐵𝐹 ) ≤ 𝜖 should hold for
missing values are either interpolated or often replaced by poor signal achieving convergence, where 𝑎𝑣𝑔𝐹 is the average fitness score, and
strength values. The preprocessed radiomap 𝑅′ is considered for feature 𝜖 is appreciably small. In the following subsection, we have discussed
selection containing 𝑁 ′ instances or rows. the fitness function to calculate the score of the particles.

4.1. BPSO based access point selection mechanism


4.1.1. Fitness function
The inherent correlation within the APs is estimated with the Pear-
The signal strengths of the WiFi APs do not vary uniformly with
son Correlation Coefficient (Benesty et al., 2009) to measure the as-
the distance. The RSS values decrease as one moves away from an
sociation or relationship between the APs. To measure the fitness
AP source. However, for weak signal strengths, this change in RSS
(Algorithm 2) of the selected set of APs, we form a 2D correlation
value with distance is minimal. Thus, there could be some APs over
coefficient vector or cost matrix 𝐶𝑣1,𝑣2 ; 𝑣1, 𝑣2 ≤ 𝑀 ′ . A particular cell
the experimental region whose signal strengths are too weak to show
𝐶𝑣1,𝑣2 gives the correlation coefficient between recorded RSSI of AP 𝑣1
any distance sensitivity. That is, information gain from these APs is
and AP 𝑣2. The Cost Matrix 𝐶𝑣1,𝑣2 is estimated using the given Eq. (4).
almost negligible. The APs with a Standard Deviation (SD) of 0 are
deselected from 𝑅 as the RSS values from them do not contribute to ∑𝑁 ′ ′ ̄ )(𝑅′ − 𝑅′̄ )
𝑙=1 (𝑅𝑙,𝑣1 − 𝑅′𝑙,𝑣1 𝑙,𝑣2 𝑙,𝑣2
any localization information. Thus 𝑀 ′ denotes the count of the effective 𝐶𝑣1,𝑣2 = √ (4)
∑𝑁 ′ ′ ̄ )2 ∑𝑁 ′ ̄ )2
APs. Table 1 lists out the variables involved in the BPSO process along 𝑙=1 (𝑅𝑙,𝑣1 − 𝑅′𝑙,𝑣1 ′
𝑙=1 (𝑅𝑙,𝑣2 − 𝑅′𝑙,𝑣2

3
A.K. Panja, S.F. Karim, S. Neogy et al. Engineering Applications of Artificial Intelligence 107 (2022) 104538

The fitness is estimated using Algorithm 2. The fitness is the product


of sum (line 3–9) of rows estimated from the cost matrix 𝐶 for the
respective particle.

Algorithm 2: fitnessCalc(𝐶, 𝑐𝑜𝑙𝑢𝑚𝑛)


1 𝐶: Cost matrix, 𝑐𝑜𝑙𝑢𝑚𝑛:Vector containing the selected APs
2 𝑓 𝑖𝑡𝑛𝑒𝑠𝑠 ←1
3 for each v1 ∈ column do
4 𝑡𝑒𝑚𝑝 ← 0
5 for each v2 ∈ column;v2≠ v1 do
6 𝑡𝑒𝑚𝑝 ← 𝑡𝑒𝑚𝑝+ 𝐶𝑣1,𝑣2
7 end
8 𝑓 𝑖𝑡𝑛𝑒𝑠𝑠 ← 𝑓 𝑖𝑡𝑛𝑒𝑠𝑠 × 𝑡𝑒𝑚𝑝
9 end
10 return 𝑓 𝑖𝑡𝑛𝑒𝑠𝑠

4.1.2. BPSO update


The update function constitutes the velocity updation and AP selec-
tion update for each particle, the update rule is stated in Eqs. (6)–(7);
where 𝑖 ≤ 𝑝𝑆𝑖𝑧𝑒 and 𝑗 ≤ 𝑀 ′
𝑃𝑖 .𝑣𝑒𝑙 = 𝑃𝑖 .𝑣𝑒𝑙 × 𝑊 + 𝑐1 × 𝑟1 × (𝐺𝑏𝑒𝑠𝑡 − 𝑃𝑖 .𝑓 𝑒𝑎𝑡𝑢𝑟𝑒)
(6)
+𝑐2 × 𝑟2 × (𝑃𝑖 .𝑃 𝑏𝑒𝑠𝑡 − 𝑃𝑖 .𝑓 𝑒𝑎𝑡𝑢𝑟𝑒)
{
1 if 𝑠𝑖𝑔𝑚𝑜𝑖𝑑(𝑃𝑖 .𝑣𝑒𝑙[𝑗]) ≥ 0.5
𝑃𝑖 .𝑓 𝑒𝑎𝑡𝑢𝑟𝑒[𝑗] = (7)
0 if 𝑠𝑖𝑔𝑚𝑜𝑖𝑑(𝑃𝑖 .𝑣𝑒𝑙[𝑗]) < 0.5
Fig. 2. Access point selection procedure using binary PSO.
Algorithm 3 depicts the procedure of the BPSO update rule used in
our feature selection procedure. We have calculated the fitness score of
𝑅′𝑙,𝑣 and 𝑅′𝑙,𝑣 are the RSS values from AP 𝑣𝑖 and AP 𝑣𝑗 , while on particle 𝑖 referenced as 𝑃𝑖 .𝑓 𝑖𝑡𝑛𝑒𝑠𝑠 (local best fitness) using Algorithm
𝑖 𝑗 2. 𝐺𝑏𝑒𝑠𝑡 indicates the global best selection of WiFi AP set selected
varying 𝑙 we select the different records on the floor map. The objective
among the particles. The global best vector is updated whenever a
is to minimize the correlation, hence, the fitness function is given as
better fitness score is found among the current selection. If the fitness
follows.
score is less than the previously estimated fitness score 𝑃𝑖 .𝑓 𝑖𝑡𝑛𝑒𝑠𝑠, the
′ ′
𝑀 ∑
∏ 𝑀 local best selection or particle best selection 𝑃𝑖 .𝑃 𝑏𝑒𝑠𝑡 is updated with
min 𝐶𝑣𝑖 ,𝑣𝑗 (5) the newly estimated feature combination, and the local best fitness
𝑣𝑖 =1 𝑣𝑗 =1 score 𝑃𝑖 .𝑓 𝑖𝑡𝑛𝑒𝑠𝑠 is also updated accordingly. The new velocity of the
particle 𝑃𝑖 is evaluated by substituting the old velocity of the previous
Algorithm 1 calculates the cost matrix 𝐶 for a particular particle.
iteration into Eq. (6). We have evaluated the current selection of the
The particle’s current selection is passed to the function as parameter particle by passing the updated velocity vector through the sigmoid
𝑆𝐹 𝑒𝑎𝑡𝑢𝑟𝑒. The selected APs from 𝑆𝐹 𝑒𝑎𝑡𝑢𝑟𝑒 are first extracted to a function (Eq. (7)) and the comparison is done in Eq. (7). During
collection (lines 6–11 of Algorithm 1). This collection is utilized to the process of velocity updation in every PSO procedure, difference
calculate the pairwise correlation of all the selected APs through lines between the previous best selection vector and the present selection
12–16 of Algorithm 1. vector is calculated both for the cognitive and the social component.
The cognitive component is calculated as 𝑃𝑖 .𝑃 𝑏𝑒𝑠𝑡 − 𝑃𝑖 .𝑓 𝑒𝑎𝑡𝑢𝑟𝑒 and the
social component is calculated as 𝐺𝑏𝑒𝑠𝑡 − 𝑃𝑖 .𝑓 𝑒𝑎𝑡𝑢𝑟𝑒.
Algorithm 1: costMatrix(𝑅′ , 𝑆𝐹 𝑒𝑎𝑡𝑢𝑟𝑒,𝑀 ′ )
For both the cognitive component and the social component the dif-
Result: Correlation Coefficient Matrix 𝐶𝑣1,𝑣2 ference is estimated by subtracting 0’s and 1’s. So the possible values
1 𝑆𝐹 𝑒𝑎𝑡𝑢𝑟𝑒𝑣 - selected binary feature vector (𝑣 ≤ 𝑀 ′ ), for the difference can be 0,1 and −1. For APs that are selected in both
2 𝑅′ - Preprocessed Radio Map Database the vectors of 𝑃𝑖 .𝑃 𝑏𝑒𝑠𝑡 and 𝑃𝑖 .𝑓 𝑒𝑎𝑡𝑢𝑟𝑒𝑠 the difference is 0. The change
3 𝑡𝑒𝑚𝑝 ← 0 in the AP selection metric happens only when the difference is −1&1. If
4 Initialize dynamic vector 𝑐𝑜𝑙𝑢𝑚𝑛 the AP is present in 𝑃𝑖 .𝑓 𝑒𝑎𝑡𝑢𝑟𝑒𝑠(particles 𝑖’s current selection) and not
5 Initialize each location of vector 𝐶[𝑀 ′ x 𝑀 ′ ] to 0 in 𝑃𝑖 .𝑃 𝑏𝑒𝑠𝑡((particles 𝑖’s best selection) or 𝐺𝑏𝑒𝑠𝑡(global best selection)
6 for v=1 to M’ do the difference is −1. The velocity vector decreases towards the negative
7 if SFeature[v]==1 then 𝑥-direction, hence the sigmoid function is pushed towards 0. Similarly,
8 𝑡𝑒𝑚𝑝 ← 𝑡𝑒𝑚𝑝 + 1 if an AP is not selected in 𝑃𝑖 but is present in 𝑃 𝑏𝑒𝑠𝑡 or 𝐺𝑏𝑒𝑠𝑡, the sigmoid
9 𝑐𝑜𝑙𝑢𝑚𝑛[𝑡𝑒𝑚𝑝] = 𝑣 function is pushed towards 1.
10 end The convergence of BPSO depends upon various criteria. In standard
11 end BPSO, velocity contains both direction and speed; hence, it is a vector
12 for each v1∈ column do quantity. Thus, any updation in the particle’s velocity brings changes in
13 for each v2 ∈ column;v2≠ v1 do the speed and the selection/deselection of features. In Ye et al. (2013),
14 Estimate 𝐶𝑣1,𝑣2 using Eq (4) the authors have proved that if the PSO algorithm is convergent, the
15 end velocity of the particles moves towards zero or stays unchanged until
16 end the end of the iteration. However, for our work involving BPSO, the
17 return 𝐶, 𝑐𝑜𝑙𝑢𝑚𝑛 velocity update rule is a little modified that involves the sigmoid
function as stated in Eq. (7). Hence, when the velocity reaches zero,

4
A.K. Panja, S.F. Karim, S. Neogy et al. Engineering Applications of Artificial Intelligence 107 (2022) 104538

Algorithm 3: bpsoUpdate(𝑃 ) impart an equivalent amount of information for localization, i.e., they
lie on the Pareto-front. As the ambient conditions for training and
1 𝐺𝑏𝑒𝑠𝑡:Vector storing Global Best Position, 𝐺𝐵𝐹 :Global Best
testing may vary, it is not easy to ascertain which set of selected APs out
Fitness,
of the 𝑘 combinations would work better than the other for a given test
2 𝑀 ′ :Total number of APs (SD=0 removed) , 𝑃𝑖 .𝑃 𝑏𝑒𝑠𝑡:Local best
condition. Hence, to retain the generality of the classification model,
selection of AP by particle 𝑖, 𝑃𝑖 .𝑓 𝑒𝑎𝑡𝑢𝑟𝑒:Vector containing the
an ensemble of classifiers is built based on the different feature sets
APs selected by particle 𝑖, 𝑃𝑖 .𝑣𝑒𝑙:Velocity vector of particle 𝑖,
selected from the 𝑘 combinations. A base classifier is tuned individually
𝑃𝑖 .𝑓 𝑖𝑡𝑛𝑒𝑠𝑠:Fitness value of selected AP by particle 𝑖.
for each of these feature sets. In the end part of the pipeline, we
3 for i=1 to pSize do
have proposed a neural network with two hidden layers used as a
4 //velocity update
meta-model that predicts the outcome depending on the base classifier
5 𝑐𝑜𝑔𝑛𝑖𝑡𝑖𝑣𝑒 ← (𝐺𝑏𝑒𝑠𝑡 − 𝑃𝑖 .𝑓 𝑒𝑎𝑡𝑢𝑟𝑒) ∗ 𝑐1 ∗ 𝑟1
outcomes. The backpropagation algorithm here tunes the weights for
6 𝑠𝑜𝑐𝑖𝑎𝑙 ← (𝑃𝑖 .𝑃 𝑏𝑒𝑠𝑡 − 𝑃𝑖 .𝑓 𝑒𝑎𝑡𝑢𝑟𝑒) ∗ 𝑐2 ∗ 𝑟2
the meta-model during training. Fig. 3 depicts the overview of the
7 𝑃𝑖 .𝑣𝑒𝑙 ← 𝑊 ∗ 𝑃𝑖 .𝑣𝑒𝑙 + 𝑐𝑜𝑔𝑛𝑖𝑡𝑖𝑣𝑒 + 𝑠𝑜𝑐𝑖𝑎𝑙
feature-based ensemble model. It is based on the stacking mechanism.
8 for j=1 to M’ do
The proposed model is summarized in Algorithm 4. The selected top
9 𝑡𝑒𝑚𝑝 ← 𝑠𝑖𝑔𝑚𝑜𝑖𝑑(𝑃𝑖 .𝑣𝑒𝑙[𝑗])
performing feature sets are referenced using the vector 𝑎𝑝𝑆𝑒𝑡; where
10 if 𝑡𝑒𝑚𝑝 ≤ 0.5 then
𝑎𝑝𝑆𝑒𝑡 = { 𝑎𝑝𝑆𝑒𝑡1 , 𝑎𝑝𝑆𝑒𝑡2 ...𝑎𝑝𝑆𝑒𝑡𝑏𝑐𝑜𝑢𝑛𝑡 }. During the training phase, the
11 𝑃𝑖 .𝑓 𝑒𝑎𝑡𝑢𝑟𝑒[𝑗] ← 0
base level model 𝐵𝑠 is trained with training set, 𝑇𝑟 = (𝑋𝑡𝑟𝑎𝑖𝑛 , 𝑌𝑡𝑟𝑎𝑖𝑛 );
12 else
where 𝑇𝑟 ∈ 𝑅′ and 𝑠 is iterated from 1 to 𝑏𝑐𝑜𝑢𝑛𝑡. The output 𝑌𝑝𝑟𝑒𝑑 from
13 𝑃𝑖 .𝑓 𝑒𝑎𝑡𝑢𝑟𝑒[𝑗] ← 1
base learners are aggregated as 𝑋 ′ which forms the feature vector for
14 end
fitting the meta model. The meta model 𝑀𝑇 is trained with 𝑋 ′ with its
15 end
respective class label 𝑌𝑡𝑟𝑎𝑖𝑛 .
16 𝑆𝐹 𝑒𝑎𝑡𝑢𝑟𝑒 ← 𝑃𝑖 .𝑓 𝑒𝑎𝑡𝑢𝑟𝑒
17 //construct cost matrix Algorithm 4: stackingEnsemble(𝑎𝑝𝑆𝑒𝑡, 𝑅′ )
18 𝑐𝑀𝑎𝑡, 𝑐𝑜𝑙𝑢𝑚𝑛=𝑐𝑜𝑠𝑡𝑀𝑎𝑡𝑟𝑖𝑥(𝑅′ , 𝑆𝐹 𝑒𝑎𝑡𝑢𝑟𝑒, 𝑝𝑆𝑖𝑧𝑒) 1 Input: 𝑅′ Preprocessed radio map vector, 𝑎𝑝𝑆𝑒𝑡[ ] Access point
19 𝑡𝑒𝑚𝑝𝐹 𝑖𝑡𝑛𝑒𝑠𝑠 ← 𝑓 𝑖𝑡𝑛𝑒𝑠𝑠𝐶𝑎𝑙𝑐(𝑐𝑀𝑎𝑡, 𝑐𝑜𝑙𝑢𝑚𝑛) sets selected by BPSO,
20 if tempFitness < 𝑃𝑖 .𝑓 𝑖𝑡𝑛𝑒𝑠𝑠 then 2 𝑏𝑐𝑜𝑢𝑛𝑡: number of selected subsets of APs
21 𝑃𝑖 .𝑃 𝑏𝑒𝑠𝑡 ← 𝑆𝐹 𝑒𝑎𝑡𝑢𝑟𝑒 3 Output: Prediction outcome of the ensemble
22 𝑃𝑖 .𝑓 𝑖𝑡𝑛𝑒𝑠𝑠 ← 𝑡𝑒𝑚𝑝𝐹 𝑖𝑡𝑛𝑒𝑠𝑠 4 Initialize Training and Test Set from Radio Map R’
23 if tempFitness < GBF then 5 𝑇𝑟 ← (𝑋𝑡𝑟𝑎𝑖𝑛 , 𝑌𝑡𝑟𝑎𝑖𝑛 )
24 𝐺𝑏𝑒𝑠𝑡 ← 𝑆𝐹 𝑒𝑎𝑡𝑢𝑟𝑒 6 𝑇𝑡 ← (𝑋𝑡𝑒𝑠𝑡 , 𝑌𝑡𝑒𝑠𝑡 )
25 𝐺𝐵𝐹 ← 𝑡𝑒𝑚𝑝𝐹 𝑖𝑡𝑛𝑒𝑠𝑠 7 for s=1 to bcount do
26 end 8 𝑡𝑒𝑚𝑝𝑇𝑟 ← 𝑇𝑟
27 end 9 Deselect APs ∉ 𝑎𝑝𝑆𝑒𝑡𝑠 from 𝑡𝑒𝑚𝑝𝑇𝑟
28 end 10 Initialize Base learner 𝐵𝑠 with the Training Algorithm
11 Fit the Model 𝐵𝑠 with 𝑡𝑒𝑚𝑝𝑇𝑟
12 end
13 Initialize empty vector 𝑌𝑝𝑟𝑒𝑑
𝑠𝑖𝑔𝑚𝑜𝑖𝑑(𝑃𝑖 .𝑣𝑒𝑙[𝑗]) = 0.5 for the AP 𝑗 of the 𝑖th particle. Now, for 14 for s=1 to bcount do
𝑃𝑖 .𝑣𝑒𝑙[𝑗] > 0, 𝑠𝑖𝑔𝑚𝑜𝑖𝑑(𝑃𝑖 .𝑣𝑒𝑙[𝑗]) > 0.5. Thus, no bit flip occurs following 15 Deselect APs ∉ 𝑎𝑝𝑆𝑒𝑡𝑠 from 𝑋𝑡𝑟𝑎𝑖𝑛
Eq. (7); i.e. no selection or de-selection of AP occurs. However, if 16
(𝑠)
𝑌𝑝𝑟𝑒𝑑 ← 𝐵𝑠 (𝑋𝑡𝑟𝑎𝑖𝑛 )
𝑃𝑖 .𝑣𝑒𝑙[𝑗] < 0, then, 𝑃𝑖 .𝑓 𝑒𝑎𝑡𝑢𝑟𝑒[𝑗] changes from 1 to 0.
17 /* Get the predicted labels of 𝑋𝑡𝑟𝑎𝑖𝑛 into vector 𝑌𝑝𝑟𝑒𝑑 */
Thus, when 𝑃𝑖 .𝑣𝑒𝑙[𝑗] ≈ 0, bit flip may occur depending on the
18 end
direction of change of value. However, the weight 𝑊 plays a crucial
19 𝑋 ′ ← 𝑌𝑝𝑟𝑒𝑑 is the input feature to the Meta Model, MT
role here (Khanesar et al., 2007). In Eq. (6), 𝑊 = 1 for our work.
20 Initialize the architecture of the 𝑀𝑇 ← {𝑙𝑎𝑦𝑒𝑟1 , .., 𝑙𝑎𝑦𝑒𝑟𝑑 }
Consequently, following the stopping criteria 𝑎𝑣𝑔𝐹 − 𝐺𝐵𝐹 < 𝜖 as
21 Learn the weights of the 𝑀𝑇 by fitting (𝑋 ′ , 𝑌𝑡𝑟𝑎𝑖𝑛 )
stated in the flowchart (Fig. 2), once the Gbest stabilizes, convergence
22 Evaluate the model by 𝑇𝑡
could be achieved as the velocity, though closer to 0, would remain
unchanged. During the validation of the learning process, the validation set 𝑇𝑡 =
Space Complexity: In the AP selection procedure, every particle 𝑃𝑖 (𝑋𝑣𝑎𝑙 , 𝑌𝑣𝑎𝑙 ) is passed through both base level (𝐵𝑠 ) and the meta level
has 3 memorizer vector associated with them namely: 𝑃𝑖 .𝑣𝑒𝑙, 𝑃𝑖 .𝑃 𝑏𝑒𝑠𝑡 𝑀𝑇 . Validation of the model takes place by comparing the predicted
and 𝑃𝑖 .𝑓 𝑒𝑎𝑡𝑢𝑟𝑒. The dimension of each vector is of the order of number output from the meta model with the actual class label 𝑌𝑣𝑎𝑙 .
of APs which in our case is represented with 𝑀 ′ (APs with 𝑆𝐷 = 0
removed). Hence, if there are 𝑝𝑆𝑖𝑧𝑒 number of particles then the total 5. Experiments and analysis
space complexity is 𝑂(3 ∗ 𝑝𝑆𝑖𝑧𝑒 ∗ 𝑀 ′ ).
The BPSO based AP selection is a part of the offline training phase In this section, the proposed metaheuristic based AP selection pro-
which is performed in the server. cedure along with the ensemble model is validated against our col-
lected dataset and two benchmark datasets, JUIndoorLoc (Roy et al.,
4.2. Design of the proposed feature based ensemble model 2019a) and UJIIndoorLoc (Torres-Sospedra et al., 2014) at different
granularity.
The BPSO is executed a number of times obtaining 𝑘 combination
of feature sets. The radiomap datasets are formed using data collected 5.1. Experimental setup
from multiple devices under different ambient conditions. Due to the
difference in sensitivity of devices and other environmental factors, the We have mapped the physical floor into reference coordinates (𝑥, 𝑦),
signal strength obtained from the same set of APs might have variation which is formed by dividing the floor into virtual grids of 1 × 1 sq.m.
(slight or significant), which adds an extra dimension to the optimiza- During the data collection phase, we have developed the android
tion problem. Two different feature sets on the same floormap may application in a manner so that the hotspots can be detected. We

5
A.K. Panja, S.F. Karim, S. Neogy et al. Engineering Applications of Artificial Intelligence 107 (2022) 104538

Fig. 3. Framework of the proposed ensemble of classifiers.

Table 2
Essential parameters of the fingerprint datasets for experimentation.
Dataset AP count Label count Sample count
D1 105 152 548
D2 105 152 1257
D3 105 152 1184
D4 105 152 2442
Combined 105 152 5431
JUIndoorLoc combined (Floor-4) 172 514 5290
UJIIndoorLoc (Building 1) 520 235 5197

Fig. 4. Histogram depicting the number of samples per label for the combined device
dataset. the feature metric. The selected set of APs is part of the nodes
where decisions are taken, and the leaf nodes of the tree are the
grid labels of the floormap.
only considered static registered WiFi APs for localization; the hotspots • Support Vector Machine (SVM): SVM procedure works by draw-
were detected and removed during the data preprocessing. The details ing a hyperplane among the class labels. The hyperplane is the
about the dataset can be found in Panja et al. (2021). During the optimal margin that separates the labels, in our case, the grids.
preprocessing, missing RSS records are replaced with −110 dBm, a very • Gaussian Naive Bayes: The algorithm is based on Bayes’ Theo-
low value indicating the APs are to be out of range. rem. For the attributes, in our case, the APs, it draws a conditional
The dataset contains readings from four mobile devices (Samsung relationship and infers the probability of the class labels. The
Galaxy Tab, Moto G, Redmi Note 4, and Google Pixel) collected for probabilistic classifier inherently considers the distribution to be
a period of 21 days covering a floor of a building of our university. Normal. Hence, if there is a perturbation in the dataset, the
A histogram is depicted in Fig. 4, which shows an overview of the accuracy metric is indirectly affected.
number of samples per label or grids in the radio map database. The • Artificial Neural Network (ANN): Neural networks mimic the
depicted histogram is a combination of all the fingerprints collected neurons in our brain and their interconnection. The input layer
using all four devices. It can be observed that the collected dataset has contains the feature vectors, i.e., the RSS from the APs. In the
imbalanced class labels. The class imbalance has a direct consequence grid-based positioning domain, the grids are categorical data that
on the accuracy metric. To tackle the class imbalance problem, Synthetic are label encoded and form the output layer. A weighted sum of
Minority Oversampling Technique (SMOTE) (Panja et al., 2021; Douzas each input tuples corresponding to the APs forms the input to the
and Bacao, 2019) is applied. The procedure iterates through the radio
activation function and hence, the processing of the hidden layer.
map database to find the minority class labels and generate synthetic
The forward pass for evaluating and backward pass for weight
samples by utilizing the nearest-neighbor procedure. SMOTE is by far
correction form the basis of the learning process of the ANN.
a better approach over random oversampling of minority class samples
for lower-dimensional data (Lusa and Blagus, 2012). We have carried out the experiments using the feature-based en-
Table 2 depicts the salient points about the datasets on which exper- semble approach to explore the potency of the proposed approach by
imentations are performed. The selected set of classifiers on which the altering the base learners with different classifiers. The meta classifier
performance of the BPSO based feature selection approach is measured is a two-layer ([𝑙𝑎𝑦𝑒𝑟 1∶ 70, 𝑙𝑎𝑦𝑒𝑟 2∶ 100]) neural network model. The
are: feature-based trained base learners are altered and experimented with
• K-Nearest Neighbor (kNN): The model of KNN draws a class kNN, Decision Tree, and ANN. For the experiments conducted with
membership based on the proximity or distance metric to the ANN as base learners, we have used a three-layer architecture ([𝑙𝑎𝑦𝑒𝑟
samples in the class. The distance is measured with the attribute 1∶ 70, 𝑙𝑎𝑦𝑒𝑟 2∶ 60, 𝑙𝑎𝑦𝑒𝑟 3: 100]). The weights are inferred through the
values or the RSSI values corresponding to the APs. The hyperpa- backpropagation procedure.
rameter 𝑘 is varied and tuned accordingly. The subsequent subsections present the various experiments con-
• Decision Tree: It is a tree-based learning where the decisions are ducted using collected as well as benchmark datasets with error and
taken against each of the samples in the tree nodes concerning performance analysis discussed in Section 5.5.

6
A.K. Panja, S.F. Karim, S. Neogy et al. Engineering Applications of Artificial Intelligence 107 (2022) 104538

Table 3 Table 4
Default parameter setting for the BPSO based feature selection algorithm. Cross validation accuracy after BPSO based feature selection approach.
BPSO parameter Setting Dataset KNN Naïve Bayes SVM Decision tree
Swarm Size (pSize) 50 D1 34.03(±3.7) 68.68(±2) 72.8(±2.9) 73.25(±1.7)
Maximum Iteration (maxIter) 100 D2 86.6(±3.4) 91.4(±3.8) 84.65(±3.7) 90.8(2.7)
Acceleration variables (c1,c2) 2 D3 74.23(±2.7) 68.9(±1.2) 92.46(±3.8) 92.08(±3.8)
Initial particle feature Random selection D4 81.56(±1.4) 30.06(±3) 91.2(±3.3) 91.65(±3.3)
Velocity initialization (−2,2) Combined 90.06(±0.22) 18.65(±2.4) 90.72(±2.2) 89.9(±0.223)
Weight (W) 1

Fig. 5. Convergence of the BPSO based feature selection approach with the mean
fitness.
Fig. 7. Comparison of classification accuracy among selected classifiers before and
after applying BPSO based feature selection approach.

Fig. 6. The effect of features on localization accuracy.

Fig. 8. Accuracy on 𝐷1 Dataset with and without Smote Approach after applying BPSO.

5.2. Performance analysis of BPSO on collected radio map

In this section, we will report the empirical results obtained using imbalanced one among the radiomap datasets. A plot depicting the
the BPSO approach on our dataset in this section. We have consoli- effects of SMOTE on the BPSO based AP selection is provided in Fig. 8.
dated the parameter setting of our experiments in Table 3. The first The plot shows that the proposed approach can identify the important
experiment indicates that a stable solution is found out through the APs for datasets having both (im)balanced class samples.
proposed feature selection procedure as shown in Fig. 5. Thus, the
maximum iteration value taken for the subsequent experiments is 100. 5.3. Performance analysis of the proposed ensemble approach
It is essential to investigate the effect of the number of important APs on
the localization performance across different state-of-the-art classifiers. In Table 5, we have presented a comparative accuracy table among
From Fig. 6, it can be observed that with around 30 important APs, the all the selected classifiers (kNN, Naive Bayes, Decision Tree, SVM)
localization performance almost stabilizes for most of the classifiers. with the proposed ensemble approach. We have observed that even
For SVM classifier, we have observed that with the use of polynomial with an imbalanced dataset, the ensemble of feature vectors can re-
kernel the accuracy of the classifier increases highly instead of using a tain appreciable localization performance across different classifiers.
radial bias function kernel. Performance improves as the dataset contains more fingerprints from
The 𝐶𝑜𝑚𝑏𝑖𝑛𝑒𝑑 set contains data from all the devices; hence, the different devices (for the 𝐶𝑜𝑚𝑏𝑖𝑛𝑒𝑑 dataset). A comparative analysis
data distribution causes the Gaussian Naive Bayes classifier to give less using feature-based majority voting with the proposed training pipeline
accuracy. is presented in Table 6. Due to the varying WiFi sensitivity of different
In Table 4, we have reported the 10-fold cross-validation accuracy devices, the optimal feature sets may not impart similar classification
using the selected set of features after the application of the BPSO information for a given device. So, the meta classifier, which prioritizes
approach. It can be observed that SVM and Decision Tree classifiers some of the base learners, is found to improve the proposed ensemble’s
perform better on the datasets. In order to detail the effect of the feature accuracy compared to majority voting.
selection approach on the classifier performance, an experiment is In Table 7, the accuracy results after the application of SMOTE
conducted. The results are shown in Fig. 7 that compares the accuracy is reported. We have observed that the accuracy values for the kNN
values before and after the application of the AP selection process. We classifier have significantly improved. The kNN classifier becomes bi-
have observed a rise in classification accuracy for some classifiers on ased with the minority class samples. This bias is removed on the
applying the AP selection procedure. In contrast, for some, the accuracy application of SMOTE. The application of SMOTE does not change the
values remain comparable. Error deviation metric is also found to be label-specific mean values but decreases the variability of data and
reduced, which is discussed in Section 5.5. Dataset 𝐷1 is the most induces correlation between the samples. It can be observed not just for

7
A.K. Panja, S.F. Karim, S. Neogy et al. Engineering Applications of Artificial Intelligence 107 (2022) 104538

Table 5
Accuracy comparison of our proposed feature ensemble approach (Without SMOTE).
Dataset Neural network KNN Naive Bayes Decision tree SVM Neural network feature ensemble Decision tree feature ensemble kNN feature ensemble
D1 40.8 28.48 62.4 74.54 70.9 76.53 79.14 45.43
D2 68.9 84.4 90.7 90.89 82.75 88.23 91.51 84.88
D3 70.14 73.23 72.3 91.18 90.46 89.15 92.11 88.73
D4 56.68 79.39 37.51 91.95 88.4 90.81 93.45 88.54
Combined 72.81 90.05 27.9 89.6 91.78 94.28 96.99 94.17

Table 6 5.4. Analysis on benchmark datasets


Comparison of the proposed training pipeline with feature based majority voting
approach in terms of localization accuracy.
As mentioned in the earlier part of the section, we have considered
(a) Base learner accuracy of proposed ensemble model -
neural network as base learner
UJIIndoorLoc (Torres-Sospedra et al., 2014), and JUIndoorLoc (Roy
et al., 2019a) as the standard benchmark datasets. The UJIIndoorLoc
Dataset BL 1 BL2 BL3 BL4 Majority voting Proposed ensemble
covers the buildings of Universitat Jaume I. They have considered 3
D1 36.92 30.3 40.8 38.48 69.089 74.35
buildings of the university with more than 4 floors. For the data collec-
D2 57.56 58.09 64.72 67.9 78.32 87.61
D3 60 70.14 62.54 63.1 80.91 88.14 tion phase, they have considered 25 devices for constructing the radio
D4 43.93 55.12 54.71 56.68 75.36 89.9 map database. Every grid’s latitude and longitude value is mapped as
Combined 70.84 72.81 67.89 60.1 89.65 94.5 the class label. They have over 520 total APs in their feature vector
(b) Base learner accuracy of proposed ensemble model - from which the fingerprints were recorded. The APs from which the
decision tree as base learner RSS could not be measured were filled with a value of 100 dBm. For our
Dataset BL 1 BL2 BL3 BL4 Majority voting Proposed ensemble experimentation, only building 1 was considered for evaluation. For the
D1 68.2 68.4 68.4 69.09 71.51 76.36 2nd Floor of building 1 of UJIIndoorLoc Dataset (Torres-Sospedra et al.,
D2 93.8 94.2 93.33 93.36 94.42 97.16 2014) the accuracy measurements from the classifiers were recorded as
D3 81.4 89.5 90.14 89.29 90.36 91.26 shown in Table 8(a). It can be observed that the proposed AP selection
D4 90.17 91.26 91.25 90.07 92.9 94.4
mechanism is found to select 92 APs out of 520 APs. Notice there is no
Combined 94.41 97.17 94.22 93.79 96.56 97.11
significant reduction in the accuracy values even though the number of
(c) Base learner accuracy of proposed ensemble model - kNN as base learner
APs has been reduced from 520 to 92. SMOTE used in the pre-processing
Dataset BL 1 BL2 BL3 BL4 Majority voting Proposed ensemble
phase has significantly increased the accuracy values.
D1 28.48 31.51 31.45 27.87 35.65 42.54 The JUIndoorLoc (Roy et al., 2019a) dataset has over 172 APs. On
D2 83.5 82.7 81.6 83.5 83.41 85.9
application of the proposed feature selection mechanism, the number of
D3 72.11 74.36 71.54 71.26 74.64 87.04
D4 78.4 76.53 74.62 75.9 78.3 90.17 features selected by the BPSO approach is 57. It can be observed from
Combined 83.91 87.8 85.45 84.77 88.27 94.10 Table 8(b) that there is no significant decrease in the accuracy values,
and there is a slight increase in accuracy in the Decision Tree-based
approach. The SMOTE procedure considered with 𝑛𝑒𝑖𝑔ℎ𝑏𝑜𝑟𝑠 parameter
set to 5 during the pre-processing phase has significantly impacted the
training procedure and has contributed to an increase in the accuracy
value.

5.5. Error and performance analysis

The error analysis is carried out by estimating the deviation of the


predicted location point from the actual location point. This is done by
estimating the Euclidean distance of the misclassified instances from
the actual label. For our selected floor plan the labels, that is, the
location points are 1 × 1 sq.m virtual grids. The virtual grids are in
Fig. 9. Classification accuracy of proposed ensemble (neural network used as base the form of 𝐿𝑧,𝑥,𝑦 . Let the predicted and actual grid label be (𝑥′𝑖 , 𝑦′𝑖 )
learner), model training performed using device 𝐷3, 𝐷4 and testing done using device
𝐷2.
and (𝑥𝑖 , 𝑦𝑖 ) respectively. The estimated error in meters is evaluated as
follows (Eqs. (8), (9));

𝑒𝑖 = (𝑥𝑖 − 𝑥′𝑖 )2 + (𝑦𝑖 − 𝑦′𝑖 )2 (8)
the kNN classifier but for the majority of the classifiers; the accuracy
has increased. We have also observed that the Decision Tree used for The Mean Absolute Error (MAE) is calculated based on the feature-
based ensemble model’s predicted outcome as follows.
training the base learners followed by ANN-based meta learner pro-
1∑
𝑛
duced the maximum accuracy. The proposed ensemble approach with
𝑀𝐴𝐸 = 𝑒 (9)
ANN as base learners has seen minor accuracy modification(Table 7), 𝑛 𝑖=1 𝑖
but the accuracy remained consistent with the datasets. Here, 𝑛 is the number of misclassified instances.
One of the main objectives of our model is to make it robust It can be observed from Fig. 10 that the MAE is highest for Linear
and adaptive to changes in the environment and sensitivity of various SVM with Polynomial Kernel. The graph (Fig. 10) is plotted for all the
devices. The following experiments show an accuracy bar plot (Fig. 9) classifiers both with and without the AP selection approach. After the
application of the proposed AP selection approach, the MAE has de-
where the training has been done using two different devices 𝐷3 and
creased in the case of almost all the selected classifiers. Thus, the error
𝐷4 collected under different ambient conditions, and the testing is
metric has improved significantly. One of the notable decreases can
performed using data collected from device 𝐷2. It can be observed that be observed in 𝐷4 dataset using the Decision Tree classifier where the
our proposed ensemble approach is giving appreciable accuracy and error has decreased from 4.85 m to 3.67 m. It can also be noted that the
can capture different contextual contexts about the environment. MAE for the Neural Network based feature ensemble lies in the range of

8
A.K. Panja, S.F. Karim, S. Neogy et al. Engineering Applications of Artificial Intelligence 107 (2022) 104538

Table 7
Comparison of classification accuracy for the proposed feature ensemble approach after applying SMOTE.
Dataset KNN Naive Bayes Decision tree SVM Neural network feature ensemble Decision tree feature ensemble kNN feature ensemble
D1 86.84 81.3 95.34 92.24 92.4 95.89 92.33
D2 97.96 97.01 96.91 97.32 95.23 99.89 97.28
D3 91.23 79.4 98.08 95.67 93.15 98.77 97.12
D4 91.45 30.1 97.98 96.14 95.81 98.47 96.54
Combined 94.2 32.4 98.46 96.38 96.28 99.25 98.35

Fig. 10. Comparison of the proposed feature ensemble model based on MAE (estimated in meters from actual grid).

Table 8
Performance evaluation of the proposed BPSO based feature selection approach on
benchmark datasets.
(a) Accuracy of different classifiers on UJIIndoorLoc Building 1 Dataset
with and without the proposed BPSO based feature selection approach
Approach Number of KNN Decision SVM Naive
access points tree Bayes
Without PSO 520 65 70.23 26.17 61.8
With PSO 92 61 69.18 45.3 54.17
With SMOTE 92 86.31 88.10 67.14 66.22
(k_neighbors=5) and PSO
(b) Classification accuracy of different classifiers on JUIndoorLoc
𝐶𝑜𝑚𝑏𝑖𝑛𝑒𝑑 dataset with and without BPSO based feature selection
approach
Fig. 11. Prediction of the labels as a traced path with the proposed ensemble model.
Approach Number of KNN Decision SVM Naive
access points tree Bayes
Without PSO 172 80.65 92.56 93.38 77.9
With PSO 57 79.59 94.13 93.25 72.63
ensemble approach. The CDF drawn shows that more than 85% of the
With SMOTE 57 97.97 97.34 96.69 82.3 deviations are within 1 m–3 m for the misclassified instances.
(k_neighbors=5) and PSO We have performed some experimentation by varying the number
of base learners and their architecture. A snapshot of 3 sets of com-
binations of base and meta-model can be observed in Table 9. It can
be observed that on decreasing the base learner count from 4 to 2,
1.5 − 2.5 m, which is giving a better result than the rest of the selected the accuracy on the 𝐶𝑜𝑚𝑏𝑖𝑛𝑒𝑑 device dataset has decreased by 3%.
classifiers. A simple path traced on two particular walks is shown in However, the error deviation has increased by 0.24 m. On varying
Fig. 11, showing the actual and predicted values of the labels. the architecture from a (70, 60, 100) combination of hidden layers to
The Cumulative Distribution Function (CDF) against the error de- (100, 120, 150) there was no significant rise in accuracy metric, although
the MAE decreased by 0.287 m. It can be observed in Table 7 that
viations is plotted in Fig. 12. The CDF gives the probability that the
the Decision Tree works best for training the feature-based ensemble
positioning error takes on a value less than or equal to 𝑖 meters model. However, a significant decrease in the error metric has been
deviation. For the proposed feature ensemble pipeline with ANN as the observed when ANN is used as the base classifier.
base learner, the majority of the positioning errors are found to be lying We have also compared (Fig. 13) the proposed feature-based en-
within 3m. The MAE is found to be around 2.68 m for the proposed semble with some of the popular feature selection approaches like

9
A.K. Panja, S.F. Karim, S. Neogy et al. Engineering Applications of Artificial Intelligence 107 (2022) 104538

Fig. 12. Cumulative distribution function of positioning errors (in meters).

Table 9
Effects of varying the feature based ensemble architecture.
Metric Combination 1 Combination 2 Combination 3
Base learner count 4 2 4
Base learner architecture (70,60,100) (70,60,100) (100,120,150)
Meta learner architecture (70,100) (70,100) (70,100)
Accuracy 96.28 93.15 97.35
Epochs 25 25 40
MAE 2.88 m 3.125 m 2.539 m

Select-K-Best, PCA, Extra Tree. The plot for the experiment presented is
done with ANN as the base classifier for the training process. The graph Fig. 13. Accuracy comparison on application of state-of-the art feature selection
is plotted on an imbalanced dataset 𝐷1 and 𝐶𝑜𝑚𝑏𝑖𝑛𝑒𝑑 device dataset. approach with the proposed approach (in meters).

It has been observed that our proposed approach is performing better


in both the selected datasets.
A recent publication on clustering based multiple AP selection of both the approaches has been done on the same radiomap dataset
during experimentation for better clarity.
(MAPS) approach proposed by Huang et al. (2020) has been compared
with this work. The MAPS approach considers the set of APs for which
6. Conclusion
the RSS values are more than a certain threshold across all the labels.
The results are reported through Table 10. It can be observed that the
The work presents a BPSO based feature selection approach for the
Mean Absoulte error (MAE) is significantly better in our case. We have AP selection problem to enhance the reliability and make the system
observed that 80% of the errors are lying within 2 m deviation from the adaptive to the dynamic environment.
actual label. The reason behind that is, our approach emphasizes more In indoor localization, there can be no AP that is important through-
on the relationship between the APs. Emphasizing the relationship out the entire experimental region. Thus, depending on the floor plan,
rather than the information gain helps our approach overcome device some APs cover some regions better, while closely situated APs could
heterogeneity by capturing different pareto-optimal AP sets. These sets be highly correlated and may impart similar knowledge to overall
are used in creating the feature-based base learners. The comparison localization performance. However, this correlation factor depends on

10
A.K. Panja, S.F. Karim, S. Neogy et al. Engineering Applications of Artificial Intelligence 107 (2022) 104538

Table 10 References
Performance comparison between two approaches.
Approach Dataset used Accuracy MAE Abbas, M., Elhamshary, M., Rizk, H., Torki, M., Youssef, M., 2019. Wideep: Wifi-based
MAPS (Huang et al., 2020) Combined 93.3 5.63 accurate and robust indoor localization system using deep learning. In: 2019 IEEE
Proposed ensemble (neural network as base learner) Combined 94.5 2.88 International Conference on Pervasive Computing and Communications (PerCom.
IEEE, pp. 1–10.
Belmonte-Fernandez, O., Montoliu, R., Torres-Sospedra, J., Sansano-Sansano, E., Chia-
Aguilar, D., 2018. A radiosity-based method to avoid calibration for indoor
positioning systems. Expert Syst. Appl. 105, 89–101.
the ambient conditions and context, such as the WiFi sensitivity of Benesty, J., Chen, J., Huang, Y., Cohen, I., 2009. Pearson correlation coefficient. In:
smartphones commonly vary from one device to another. Noise Reduction in Speech Processing. Springer, pp. 1–4.
As the ambient conditions for collecting the test data instances is un- Chen, Y., Yang, Q., Yin, J., Chai, X., 2006. Power-efficient access-point selection for
known, it is hard to distinguish between the AP sets having comparable indoor location estimation. IEEE Trans. Knowl. Data Eng. 18 (7), 877–888.
Chen, X., Zou, S., 2017. Improved Wi-Fi indoor positioning based on particle swarm
performance as chosen by the various runs of the BPSO based feature
optimization. IEEE Sens. J. 17 (21), 7143–7148.
selection procedure. Thus, to develop a reliable and adaptive system, it Cottone, P., Gaglio, S., Re, G.L., Ortolani, M., 2016. A machine learning approach for
is important to retain the classification model’s generality. So, a feature- user localization exploiting connectivity data. Eng. Appl. Artif. Intell. 50, 125–134.
based ensemble model is proposed in this paper. A brief discussion Dong, N., Fang, X., Wu, A.-g., 2016. A novel chaotic particle swarm optimization
about the problem definition, selection procedure, and training proce- algorithm for parking space guidance. Math. Probl. Eng. 2016.
Douzas, G., Bacao, F., 2019. Geometric SMOTE a geometrically enhanced drop-in
dure is presented. Interestingly, we found that the BPSO based feature
replacement for SMOTE. Inform. Sci. 501, 118–135.
selection algorithm captures the sets of APs distributed throughout the Du, X., Yang, K., 2016. A map-assisted WiFi AP placement algorithm enabling mobile
floor and hence, their range vividly covers the floor map. device’s indoor positioning. IEEE Syst. J. 11 (3), 1467–1475.
For performance analysis we have considered the proposed AP Feng, S., Duarte, M.F., 2018. Graph autoencoder-based unsupervised feature selection
with broad and local data structure preservation. Neurocomputing 312, 310–323.
selection and feature based ensemble approach and have compared
Feng, D., Wang, C., He, C., Zhuang, Y., Xia, X.-G., 2020. Kalman-filter-based integration
the results with our own collected dataset as well as the two popular of IMU and UWB for high-accuracy indoor positioning and navigation. IEEE Internet
benchmark datasets JUIndoorLoc and UJIIndoorLoc. The proposed AP Things J. 7 (4), 3133–3146.
selection process reduced the number of APs by more than 50%, and Ficco, M., 2014. Calibration-less indoor location systems based on wireless sensors. J.
the feature-based ensemble achieved an accuracy of more than 95% Ambient Intell. Humaniz. Comput. 5 (2), 249–261.
Hu, E., Deng, Z., Hu, M., Yin, L., Liu, W., 2018. Cooperative indoor positioning with
for the selected radio map datasets. The proposed training pipeline is
factor graph based on FIM for wireless sensor network. Future Gener. Comput.
also found to perform better than the commonly used approaches like Syst. 89, 126–136.
Select-K-Best, PCA, Extra Tree. Huang, P., Zhao, H., Liu, W., Jiang, D., 2020. MAPS: Indoor localization algorithm
based on multiple AP selection. Mob. Netw. Appl. 1–8.
7. Future scope and direction Jiang, P., Zhang, Y., Fu, W., Liu, H., Su, X., 2015. Indoor mobile localization based
on Wi-Fi fingerprint’s important access point. Int. J. Distrib. Sens. Netw. 11 (4),
429104.
In indoor positioning, it is crucial that the sets of the selected Khanesar, M.A., Teshnehlab, M., Shoorehdeli, M.A., 2007. A novel binary particle
features should best explain the floor map. However, APs are not swarm optimization. In: 2007 Mediterranean Conference on Control & Automation.
installed in public spaces primarily for localization performance but for IEEE, pp. 1–6.
other purposes, such as network connectivity. So, we plan to work on Kim, J., Jun, H., 2008. Vision-based location positioning using augmented reality for
indoor navigation. IEEE Trans. Consum. Electron. 54 (3), 954–962.
understanding more on this and address the problem of installing addi- Kunhoth, J., Karkar, A., Al-Maadeed, S., Al-Ali, A., 2020. Indoor positioning and
tional customized APs or hotspots for better localization performance. wayfinding systems: a survey. Human-Centric Comput. Inform. Sci. 10 (1), 1–41.
Unsupervised learning, such as, clustering techniques could be applied Li, G., Geng, E., Ye, Z., Xu, Y., Lin, J., Pang, Y., 2018. Indoor positioning algorithm
to this problem. based on the improved RSSI distance model. Sensors 18 (9), 2820.
Lusa, L., Blagus, R., 2012. Evaluation of smote for high-dimensional class-imbalanced
Other sensing modalities, such as Bluetooth beacons could also be
microarray data. In: 2012 11th International Conference on Machine Learning and
incorporated into the system at identified parts of the building where Applications. 2, IEEE, pp. 89–94.
the dominant AP sets are not strong enough for satisfactory localization Ma, L., Wang, H., Zhang, X., Qi, C., 2018. WITHDRAWN: Application of strong
performance. constrained space particle swarm optimization in reservoir optimal operation.
Noonan, J., Rotstein, H., Geva, A., Rivlin, E., 2018. Vision-based indoor positioning
of a robotic vehicle with a floorplan. In: 2018 International Conference on Indoor
CRediT authorship contribution statement
Positioning and Indoor Navigation (IPIN). IEEE, pp. 1–8.
Panja, A.K., Chowdhury, C., Roy, P., Mallick, S., Mondal, S., Paul, S., Neogy, S., 2021.
Ayan Kumar Panja: Conceptualization, Methodology, Software, In- Designing a framework for real-time wifi-based indoor positioning. In: Advances in
vestigation, Writing – original draft, Reviewing & editing. Syed Fahim Smart Communication Technology and Information Processing: OPTRONIX 2020.
Karim: Data curation, Investigation, Software. Sarmistha Neogy: Visu- Springer, pp. 71–82.
Racko, J., Machaj, J., Brida, P., 2018. Ubiquitous smartphone based localization with
alization. Chandreyee Chowdhury: Conceptualization, Visualization, door crossing detection. Eng. Appl. Artif. Intell. 75, 88–93.
Supervision, Reviewing & editing. Roy, P., Chowdhury, C., Ghosh, D., Bandyopadhyay, S., 2019a. JUIndoorLoc: A
ubiquitous framework for smartphone-based indoor localization subject to context
Declaration of competing interest and device heterogeneity. Wirel. Pers. Commun. 106 (2), 739–762.
Roy, P., Chowdhury, C., Kundu, M., Ghosh, D., Bandyopadhyay, S., 2020. Novel
weighted ensemble classifier for smartphone based indoor localization. Expert Syst.
The authors declare that they have no known competing finan- Appl. 164, 113758.
cial interests or personal relationships that could have appeared to Roy, P., Kundu, M., Chowdhury, C., 2019b. Indoor localization using stable set of
influence the work reported in this paper. wireless access points subject to varying granularity levels. In: 2019 Interna-
tional Conference on Wireless Communications Signal Processing and Networking
(WiSPNET). IEEE, pp. 491–496.
Acknowledgments
Salamah, A.H., Tamazin, M., Sharkas, M.A., Khedr, M., 2016. An enhanced WiFi indoor
localization system based on machine learning. In: 2016 International Conference
This research work is supported by the project entitled- Devel- on Indoor Positioning and Indoor Navigation (IPIN). IEEE, pp. 1–8.
oping Framework for Indoor Location Based Services with Seamless Shahzad, F., Baig, A.R., Masood, S., Kamran, M., Naveed, N., 2009. Opposition-based
Indoor Outdoor Navigation by expanding Spatial Data Infrastructure, particle swarm optimization with velocity clamping (OVCPSO). In: Advances in
Computational Intelligence. Springer, pp. 339–348.
funded by the Ministry of Science and Technology, Department of Taniuchi, D., Maekawa, T., 2014. Robust wi-fi based indoor positioning with ensemble
Science and Technology, NGP Division, Government of India, ref no. learning. In: 2014 IEEE 10th International Conference on Wireless and Mobile
NRDMS/UG/NetworkingProject/e-13/2019(G). Computing, Networking and Communications (WiMob). IEEE, pp. 592–597.

11
A.K. Panja, S.F. Karim, S. Neogy et al. Engineering Applications of Artificial Intelligence 107 (2022) 104538

Torres-Sospedra, J., Montoliu, R., Martínez-Usó, A., Avariento, J.P., Arnau, T.J., Youssef, M.A., Agrawala, A., Shankar, A.U., 2003. Wlan location determination via clus-
Benedito-Bordonau, M., Huerta, J., 2014. UjiIndoorLoc: A new multi-building and tering and probability distributions. In: Proceedings of the First IEEE International
multi-floor database for wlan fingerprint-based indoor localization problems. pp. Conference on Pervasive Computing and Communications, 2003. (PerCom 2003).
261–270. IEEE, pp. 143–150.
Wang, Z., Wang, Z., Fan, L., Yu, Z., 2020. A hybrid Wi-Fi fingerprint-based localization Zhao, Q., Zhang, S., Liu, X., Lin, X., 2010. An effective preprocessing scheme for WLAN-
scheme achieved by combining Fisher score and stacked sparse autoencoder based fingerprint positioning systems. In: 2010 IEEE 12th International Conference
algorithms. Mob. Inf. Syst. 2020. on Communication Technology. IEEE, pp. 592–595.
Ye, H., Luo, W., Li, Z., 2013. Convergence analysis of particle swarm optimizer and
its improved algorithm based on velocity differential evolution. Comput. Intell.
Neurosci. 2013.

12

You might also like