A Novel Fault Diagnosis Strategy for Heterogeneous Wireless Sensor Networks
Table 2
Pseudocode of the IABC-KELM algorithm.
Serial
Pseudocode of the IABC-KELM algorithm
1
The bee colony algorithm is initialized, the population size is SN, the maximum number of iterations is MCN, the learning period is , the learning coefficient is λ, the probability is , and the location information of all populations are initialized
2
The fitness value of each employed bee is calculated, and the global optimal fitness value is saved.
3
While ()
4
For to SN
5
For all the employed bees in the colony, according to the corresponding the probability , a suitable strategy is selected by the roulette selection method
6
Update location information according to the selected strategy
7
Calculate the current fitness value
8
If ()
9
Set
10
Else if and <
11
Calculate the position information of the current colony
12
Calculate the current fitness value
13
If ()
14
Set
15
End if
16
End if
17
End for
18
19
According to the fitness value in descending order [,,,…,NP]
20
For to SN
21
Find the th strategy to generate the location information
22
If
23
Calculate the probability value according to formula (17) End if
24
Use formula (18) to calculate the probability value
25
End for
26
The next iteration until the termination condition is met
27
End while
28
Obtain the optimal regularization coefficient and the kernel parameter in the global optimal solution
29
The obtained parameter values are used for kernel extreme learning machine training
30
Test fault diagnosis sample data. Input: data sample set and algorithm parameter initialization, output: failure accuracy result
31
Start
32
For to SN
33
Use IABC-KELM to obtain the optimal parameters (,) on to train the nuclear extreme learning machine model. Perform the node fault diagnosis test of HWSNs on
End for
34
Returns the average fault diagnosis accuracy rate of the fault diagnosis model on the node fault diagnosis test data set