# A Density-Based Random Forest for Imbalanced Data Classification
## 3 Methods
### DBRF Algorithm
According to the experimental results in Table 2, DBRF took more time to train on it than other algorithms. Therefore, for large datasets with high-dimensional features, the training time of DBRF will obviously become long; **(b)** The number of minority class samples problem. DBRF will be ineffective if the dataset has few minority class samples. Owing to the excessively scattered distribution of minority class samples, they will be deleted as noise samples when DBRF constructs the boundary domain. This will lead to an inability to build the density domain. Our proposed method will not work;
3. The problem of unclear decision boundaries between minority classes. DBRF cannot solve this problem. DBRF can just deal with the problem of the unclear decision boundary between majority samples and minority samples. This is because DBRF takes one class from the minority class group separately as the only minority class for density domain construction. ## 6 Conclusions and Future Work

We proposed a density-based random forest algorithm (_DBRF_) to improve the prediction performance, especially for minority classes. We aimed to improve the original random forest algorithm in a way that enhances its performance on imbalanced sets. To achieve this aim, we proposed to borrow some ideas from the DBSCAN algorithm. In particular, we took into account the density of objects in space to improve the prediction performance, especially for minority classes. At the same time, we considered already known approaches for the development of classifiers for imbalanced datasets, including the SMOTE algorithm. _DBRF_ was designed to recognize boundary objects, and it uses a density-based method to recognize them. Two different random forest classifiers were constructed to model the augmented boundary objects and the original dataset dependently, and the final output was determined using a bagging technique. Table 3 shows the average of 34 public imbalanced datasets. Our proposed method (_DBRF_) was the best among the five algorithms. On F1, _DBRF_ improved classification by 1.7-2.5% on average. On GM, _DBRF_ there was an improvement of approximately 1-2.5% on average. The experimental results proved the ability of the proposed algorithm (_DBRF_) to solve the problem of classifying objects located on the class boundary, including objects of minority classes, by taking into account the density of objects in space (as is done when solving the clustering problem with the DBSCAN algorithm). Several directions deserve further study in the future. First, in imbalanced data processing, the imbalance is caused by a variety of factors. To address this problem, the integration of domain knowledge into the classification models is very important. Second, we used a random forest classifier as the basic model, which suggests that our density-based method may also be effective for other models, such as XGBoost, LightGBM, and neural networks. Finally, data labeling is time-consuming; thus, methods to utilize the unlabeled data in imbalanced data classification also constitute an interesting potential avenue for future research. **Author Contributions:** Conceptualization, Q.Q. ; Data curation, J.D. ; Software, J.D. ; Supervision, Q.Q. ; Writing--original draft, J.D. ; Writing--review & editing, Q.Q. All authors have read and agreed to the published version of the manuscript. **Funding:** This work was sponsored by the National Key Research and Development Program of China (Grant No. 2018 YFB0704400), the Key Program of Science and Technology of Yunnan Province (No. 202102 AB080019-3, 202002 AB080001-2), the Key Research Project of Zhejiang Laboratory (No. 2021 PE0 AC02), and the Key Project of Shanghai Zhangjiang National Independent Innovation Demonstration Zone (No. ZJ2021-ZD-006). **Data Availability Statement:** All the datasets and source code that support the experimental findings can be accessed at: [[https://github.com/qq-shu/DBRF](https://github.com/qq-shu/DBRF)]([https://github.com/qq-shu/DBRF](https://github.com/qq-shu/DBRF)) (accessed on 8 May 2021).