# Enhancing Feature Selection for Imbalanced Alzheimer's Disease Brain MRI Images by Random Forest
## 3 Design of Imbalanced AD Medical Data Analysis Approach
### The Proposed RF-AUC-Cor Algorithm  
After the feature extraction, the extracted morphological features and texture features were combined linearly to obtain feature data. Unfortunately, there are some redundant, irrelevant, and less effective features among them, which will impact the effect of classification prediction. Moreover, the data we studied are imbalanced. Therefore, traditional feature selection algorithms are usually limited by the classification target of the highest accuracy, such that the final selected features tend to classify the minority class into the majority class. However, the minority class is what we most want to identify. Therefore, we propose a random forest-based feature selection algorithm, called RF-AUC-Cor, for high dimensional imbalanced data. The algorithm can alleviate the problem of imbalanced distribution, while performing feature selection and treating the features of the majority class and minority class fairly. The specific description of the RF-AUC-Cor algorithm is as follows:  
1. **Random Forest. ** The random forest is a decision tree integration algorithm proposed by [59]. For a given \(x\) vector, each decision tree has the right to vote and finally summarizes the voting results. The class of \(x\) is determined, based on the principle of the minority obeying the majority. The structure of the random forest algorithm is shown in Figure 3.  
In Figure 3, the random forest obtains a combination of base classifiers, including \(\{h_{1}(k),h_{2}(k),\cdots,h_{n}(k)\}\) after \(k\) training, and an ensemble classifier is formed by the base classifier. The base classifier generates the final predicted result by voting. Afterward, the random forest algorithm summarizes the voting results of all base classifiers, and the result with the highest score is used as the final prediction result. The voting calculation method is shown in Formula (9):  
\[H(x)=\operatorname*{argmax}_{y}\sum_{k}I(h_{k}(x)=y) \tag{9}\]  
where \(H(x)\) is the combination classification model, \(h_{k}\) is a decision tree model, \(y\) represents the decision tree classification result, and \(I(\cdot)\) is an indicator function. To sum up, the random forest obtains the decision tree model based on training samples, then uses the branch nodes of the decision tree to compare the eigenvalues of the test set, and finally completes the class judgment at the leaf nodes. Compared to other  
Figure 3: Random forest algorithm classifier. classifiers, random forests have a superior effect on both accuracy and AUC. Therefore, we choose the random forest to evaluate each feature;
2. **AUC evaluation criteria. ** For the problem of data imbalance, accuracy is not a good criterion for classification performance. For example, if the ratio of majority class to minority class of the imbalanced data is 9:1, then even if all the minority classes are misclassified into the majority class the final accuracy can reach 90%; however, the cost of this misclassification is very high. Therefore, researchers introduced several new performance criteria for imbalanced data problems. The most widely used criterion is the AUC. Because the AUC can treat the majority class and minority class fairly and our goal is to improve the AUC of diagnosis and prediction by feature selection, we use AUC as the evaluation criteria for the feature selection of the AD data;
3. **Correlation analysis. ** The correlation matrix provides the correlation analysis between two sets of observed variables. Taking 2 random variables \(X\) and \(Y\) as examples, and allowing \(n\) to be the number of 2 variables, then the correlation is calculated as follows: \[corr(x,y)=\frac{n\sum_{i=1}^{n}x_{i}y_{i}-\sum_{i}^{n}x_{i}\sum_{i}^{n}y_{i}}{ \sqrt{n\sum_{i=1}^{n}x_{i}^{2}-\left(\sum_{i=1}^{n}x_{i}\right)^{2}}\times\sqrt {n\sum_{i=1}^{n}y_{i}^{2}-\left(\sum_{i=1}^{n}y_{i}\right)^{2}}}\] (10)  
The correlation matrix reflects the correlation between two observation variables.