## 2 Methods
It is not possible to allocate distinct majority sample subsets for all base classifiers. Hence, in building the CBDF ensemble, the majority subset in the current iteration is chosen by cycling through all available majority subsets. Stage Three: Diversifying the data. To increase data diversity, the minority samples can be generated by a uniformly sampling with replacement method such as bootstrap aggregating (bagging) [10] methods. Then, a random subspace method [11] is applied to all the training data to create further variable diversity in samples. By excluding noisy majority samples, subsetting majority data and bagging minority ones, and by random subsetting the variable set, the training data for each base classifier become somewhat clean, diverse and more balanced. In aggregating all base classifiers, different from simple majority voting method in random forests [12], we use the current iteration training data to examine the performance of the base classifier in question. The resulting prediction accuracies will be used to calculate base classifiers' weights in the final learning ensemble. In CBDF, \(w[i]\) is computed according to the following function:  
\[w[i]=\left\{ \begin{array}{ll}0,&auc_{i}\leq 0.5\\ (auc_{max}-auc_{i})/(auc_{max}-auc_{min}),&auc_{min}\leq auc_{i}\leq auc_{ max}\end{array} \right. \tag{1}\]  
where \(auc_{max},auc_{min}\) are the maximum and minimum values among all AUCs that are greater than 0.5 respectively. When the goal of medical research is interpretation, calculating variable importance score becomes a key concern as the scores can be used to identify relevant variables and get a deeper understanding of the data. In tree ensembles, decrease of node impurity in constructing the decision tree base classifiers can be used to measure variable importance. As CBDF is an ensemble of decision trees, calculating variable importance is natural byproduct and the importance of variables can be quantified by tree node split criterion (node impurity measures). In CBDF, the variable importance for variable \(j\) in terms of mean Gini decrease is defined by:  
\[IMP_{j}^{Gini}=\frac{1}{l}\sum_{i=1}^{l}IMP_{j}^{Gini}(t_{i}) \tag{2}\]  
where \(IMP_{j}^{Gini}(t_{i})\) denotes the total reduction in impurity of variable \(j\) when splitting the nodes for building the \(i\)-th decision tree \(t_{i}\)[13]. The pseudo-code of the proposed CBDF algorithm is presented in Algorithm 1. ```
0:\(D\), Training Dataset \(X\), Feature space \(x_{1},\cdots,x_{p}\) of samples in \(D\) \(F_{i}\), Feature subset of \(X\) used in the \(i\)-th iteration \(BaseTree\), Decision tree learning algorithm \(k\), Number of majority subsets \(l\), The ensemble size Procedure:
1: Remove majority Tomek Links data in \(D\) to form \(D^{\prime}\)
2: Clustering the majority samples in \(D^{\prime}\) into \(k\) majority subsets \(Maj_{i}(i\in 1,\cdots,k)\) and discarding those subsets whose size are less than a threshold. 3: Initialize the ensemble \(C=\emptyset\)
4: FOR (\(i=1;i\leq l;i++\)) {
5: Generate bootstrap samples \(Min_{i}\) from minority samples in \(D^{\prime}\). 6: Select and combine majority subset \(Maj_{i}\) with \(Min_{i}\) to form training set \(L_{i}\)
7: Generate \(L_{i}^{\prime}\) by randomly drawing feature subset \(F_{i}\) of \(F\) from \(L_{i}\)
8: Train the base learner on \(L_{i}^{\prime}\), let \(C_{i}=BaseTree(L_{i}^{\prime})\)
9: Use \(C_{i}\) to predict the data not used in training (\(D^{\prime}-L_{i}\)) and obtain the corresponding AUC value \(auc_{i}\)
10:\(C=C\bigcup C_{i}\) }
11: Calculate weights \(w[i]\)s for all classifiers based on their \(auc_{i}\)s according to Equation (1)
12: The learning ensemble CBDF \(C\).