Research Article

Light Gradient Boosting Machine-Based Link Quality Prediction for Wireless Sensor Networks

Algorithm 2

Borderline-SMOTE algorithm for data imbalance.
Input:(Training sample set), (majority class label), (minority class label).
Output: New training sample set S.
1:  for every in do
2:    if the label of in
3:      Put into majority class sample set
4:    else
5:      Put into minority class sample set
6:  for every in do
7:    Calculate its nearest neighbors from the whole training set;
8:    Calculate the number of samples belonging to the majority class in neighbor samples, denoted as ;
9:    if
10:      Put into boundary sample set ;
11:    else
12:      Put into safe sample set ;
13:  for every in do
14:    Synthesize the new minority samples by using (2);
15:  Merge the synthesized minority sample with the original training
sample to generate a new training sample set S;
16:  return: new training sample set S.