# Identify High-Impact Bug Reports by Combining the Data Reduction and Imbalanced Learning Strategies
## 3 Methodology
### DRG Algorithm  
The DRG algorithm mainly includes the following six steps: gene coding, population initialization, selection, crossover, mutation and termination criteria judgment. Its execution process is shown in Figure 2:  
**Gene coding:** The feature sequence in the dataset is represented as a vector FD of size \(1\times\text{N}\), where N is the total number of features. We define NP as the number of populations, it is different in GA(FS), GA(IS) and GA(FS+IS). A combination of selected features is represented as a binary string, \(F_{np}~{}=~{}\{\text{f}_{1},\text{f}_{2},\ldots,\text{f}_{i},\ldots,\text{f}_ {N}\}\), \(i\in[1,\text{N}]\), \(np\in[1,\text{NP}]\). \(F_{np}\) represents a feature selection scheme. Each feature \(F_{i}\) is a \(0-1\) variable with two values: when \(\text{f}_{i}=0\), it means that the feature in FD corresponding to \(F_{i}\) is not selected, and \(\text{f}_{i}=1\) indicates that the feature in FD corresponding to \(F_{i}\) is selected. Similarly, the instance sequence in the dataset is represented as a vector SD of size \(1\times\text{M}\), where M is the total number of instances (that is the number of bug reports). Each combination of selected instances is a instance selection scheme, it is represented as a binary string, \(S_{np}~{}=~{}\{\text{s}_{1},\text{s}_{2},\ldots,\text{s}_{j},\ldots,\text{s} _{M}\}\), \(j\in[1,\text{M}]\), \(np\in[1,\text{NP}]\). Each instance \(s_{j}\) is a \(0-1\) variable. If the instance in SD corresponding to \(s_{j}\) is not selected, \(\text{s}_{j}~{}=~{}0\). And \(\text{s}_{j}~{}=~{}1\) means that the instance in SD corresponding to \(s_{j}\) is selected. **Population initialization. ** The population initialization in GA(FS) is the generation of initial feature selection scheme. The method is to use four basic feature selection algorithms (IG, CHI, OneR, Relief) to sort the dataset according to the importance of the features from high to low, and then take 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80% and 90% of the sorted dataset respectively, and thus 36 feature selection schemes are obtained. The population initialization in GA(IS) is the generation of the initial instance selection scheme. The method is to randomly generate a random number between [0, 1] at each \(s_{j}\) in each \(s_{np}\). If the random number is greater than or equal to 0.5, \(\text{s}_{j}~{}=~{}1\), otherwise \(\text{s}_{j}~{}=~{}0\), thus obtaining 36 instance selection schemes. The method of generating the initial population of GA(FS+IS) has two steps: Firstly, 36 extraction schemes are generated according to the initial population generation methods in GA(FS) and GA(IS); Then, the generated \(F_{np}\) and \(S_{np}\) were separately combined to obtain 36 extraction schemes in the initial population. **Selection:** The fitness value of each extraction scheme is calculated according to the fitness function. The extraction scheme with the largest fitness value is copied \(aNP\) times, and they will be used as \(aNP\) schemes in the next generation population (it guarantees that the extraction scheme with high fitness can be retained). Then, using the roulette selection method, the remaining \((1-a)NP\) extraction schemes in the next generation population is generated. **Crossover:** Divide all extraction schemes in the population into two groups: \([1,\text{mid}]\) and \([mid+1,NP]\), and \(mid\) is equal to \(NP/2\). The extraction schemes in the population are combined in order, and then a single point crossover is performed. We define a crossover probability \(Cros\_Ratio\), it is randomly generated value. If \(Cros\_Ratio\) is greater than or equal to the crossover probability lower bound \(Cros\_L\) and less than or equal to the crossover probability upper bound \(Cros\_H\), the crossover of these two extraction schemes will be carried out, otherwise they will not crossover. If crossover is performed, a crossover point is randomly generated, then all the gene positions after this point in both two extraction schemes will be exchanged. **Mutation.