## 3 Materials and Methods
### Adapted BPSO Algorithm for Feature Selection in the Case of DLAs Sensors Data  
The BPSO algorithm is adapted after the binary version of the PSO algorithm [35]. A method similar to the one presented in [36] is considered in order to the restrict the values of the positions of the particles to take values from the set \(\{0,1\}\). The inputs of the adapted BPSO Algorithm 2 are: \(N_{particles}\)--The number of particles, \(N_{iterations}\)--The maximum number of iterations, \(c_{1}\)--The acceleration coefficient for the cognitive component, \(c_{2}\)--The acceleration coefficient for the social component, \(w_{min}\)-- The minimum value for the inertia, \(w_{max}\)--The maximum value for the inertia, \(V_{min}\)--The minimum possible value for the velocity, \(V_{max}\)--The maximum possible value for the velocity, \(D\)--The number of dimensions of the search space, and \(N_{sensors}\)-- The number of monitoring sensors. The output \(g_{best}\) describes the position of the best particle after the maximum number of iterations \(N_{iterations}\). The adapted BPSO algorithm starts with the initialization of the particles that correspond to each monitoring sensor (line 1) and then for each particle that corresponds to a monitoring sensor, the corresponding fitness value is calculated (lines 2-4). Next, the weights of each sensor particle are computed (lines 5-7) in such a way that the weights are proportional to the fitness values of the sensor particles. The particles swarm is initialized randomly (line 8) and the value of the initial iteration \(i\) is set to 0 in (line 9). The algorithm is then executed for a maximum number of iterations \(N_{iterations}\) given as input. In each iteration for each particle from the swarm (lines 11-15), the fitness value is computed in (line 12) using the \(ObjectiveFunction\) and the functions \(UpdatedLocalBest\) and \(UpdateGlobalBest\) update the values of \(p_{best}\) and \(g_{best}\) as follows:  
\[p_{best}=\left\{ \begin{array}{ll}p&\mbox{if $Fitness(p)> Fitness(p_{best})$}\\ p_{best}&\mbox{otherwise}\end{array} \right. \tag{7}\]  
\[g_{best}=\left\{ \begin{array}{ll}p_{best}&\mbox{if $Fitness(p_{best})> Fitness(g_{best})$}\\ g_{best}&\mbox{otherwise.}\end{array} \right. \tag{8}\]  
The inertia is updated (line 16) considering the values of \(i\), \(w_{min}\) and \(w_{max}\) as follows:  
\[w=\left\{ \begin{array}{ll}w_{max}&\mbox{if $i=0$}\\ max(w-i,w_{min})&\mbox{if $i>0$.}\end{array} \right. \tag{9}\]```
Data:\(N_{particles}\), \(N_{iterations}\), \(c_{1}\), \(c_{2}\), \(w_{min}\), \(w_{max}\), \(V_{min}\), \(V_{max}\), \(D\), \(N_{sensors}\) Result:\(g_{best}\)
1 Initialize the particles that correspond to each monitoring sensor \(S=\{s_{1},...,s_{N_{sensors}}\}\);
2 for\(s\in S\)do
3\(Fitness(s)=ObjectiveFunction(s)\);
4
5 end for
6 for\(k=1\) to \(N_{sensors}\)do
7\(t_{k}=2\times\frac{Fitness(s_{k})}{\sum_{i=1}^{N_{sensors}}Fitness(s_{i})}\);
8
9 end for
10 Initialize the swarm of particles \(Swarm=\{p_{1},...,p_{N_{particles}}\}\);
11\(i=0\);
12 while\(i<N_{iterations}\)do
13 for\(p\in Swarm\)do
14\(Fitness(p)=ObjectiveFunction(p)\);
15\(UpdateLocalBest(p,p_{best})\);
16\(UpdateGlobalBest(p_{best},g_{best})\);
17
18 end for
19\(UpdateInertia(w,w_{min},w_{max},i)\);
20 for\(j=1\) to \(|Swarm|\)do
21 for\(d\in D\)do
22\(v_{d}^{new}=w\times v_{d}^{old}+c_{1}\times r_{1}\times(p_{best,d}-x_{d}^{ old})+c_{2}\times r_{2}\times(g_{best,d}-x_{d}^{old})+\sum_{k=1}^{N_{sensors}}t_{k}\times r_{k +2}\times(s_{k,d}-x_{d}^{old})\);
23 if\(v_{d}^{new}\
ot\in(V_{min},V_{max})\)then
24\(v_{d}^{new}=max(min(V_{max},v_{d}^{new}),V_{min})\);
25 end if
26\(S(v_{d}^{new})=\frac{1}{1+e^{-\frac{v_{d}^{new}}{d}}}\);
27 if\(r_{0}<S(v_{d}^{new})\)then
28\(x_{d}^{new}=1\);
29 else
30\(x_{d}^{new}=0\);
31 end if
32
33 end for
34\(i=i+1\);
35
36 end for
37 return \(g_{best}\);
```

**Algorithm 2**Adapted BPSO Algorithm.