Research on the Hybrid Model Combining Decision Trees and Naive Bayes Based on a Dynamic Switching Mechanism
Mei Qian, Yan Xia Gao, Yujie Wang · 2025
With the rapid development of machine learning, classification problems have become increasingly important in the field of data mining. Naive Bayes and Decision Trees are two commonly used classification algorithms, but each has its own limitations. Naive Bayes assumes feature independence and is suitable for data with linear relationships between features, while Decision Trees perform better in capturing complex nonlinear relationships within the data. To overcome these limitations, this paper proposes a dynamic switching algorithm that combines the ID3 decision tree and Naive Bayes. The algorithm dynamically selects the most suitable classification method by analyzing the correlation between features and target labels. When there is a strong linear correlation between the data features and the target label, Naive Bayes is used; when the relationships among features are more complex, the Decision Tree is retained. Experimental results show that the proposed hybrid model significantly improves classification accuracy, achieving 67.58%, compared to the use of Naive Bayes or the ID3 Decision Tree individually. This method outperforms traditional single algorithms in terms of classification performance and stability, offering greater adaptability and flexibility, and providing a novel solution for handling complex datasets.