DOI: 10.3390/app16199593 ISSN: 2076-3417

RF-SPEA2 Hybrid Rule Inference and Optimization Architecture

Cebrail Barut

The high predictive performance of machine learning models in complex classification tasks often comes with limited transparency, particularly for black-box models whose decision processes cannot be directly inspected. In this study, a two-stage Random Forest–SPEA2 hybrid rule inference and optimization architecture is proposed to achieve high predictive performance while retaining an explicit rule-based decision structure. In the first stage, root-to-leaf decision paths extracted from Random Forest trees are converted into interval-based IF–THEN rules, and a class-balanced candidate rule pool is constructed. In the second stage, the Strength Pareto Evolutionary Algorithm 2 (SPEA2) simultaneously maximizes rule-level accuracy and weighted F1-score using Pareto-based multi-objective optimization. The resulting rules preserve an explicit IF–THEN representation whose feature conditions and decision boundaries can be directly inspected. The proposed framework was evaluated on three benchmark datasets representing different classification characteristics: Breast Cancer Wisconsin for binary classification, Dry Bean for multi-class classification, and ISOLET for high-dimensional multi-class classification. Under stratified 5-fold cross-validation, RF-SPEA2 achieved mean accuracies of 96.77%, 98.08%, and 95.54% on Breast Cancer Wisconsin, Dry Bean, and ISOLET, respectively, with relatively low variability across folds. Comparative experiments showed that the proposed method achieved competitive predictive performance against conventional machine learning models while outperforming several traditional rule-based approaches. Representative IF–THEN rules obtained for the three datasets demonstrate that the resulting decision structure remains directly inspectable, although the practical interpretability of individual rules depends on the dimensionality and semantic meaning of the input features. These findings indicate that RF-SPEA2 provides a promising framework for combining competitive predictive performance with an explicit rule-based representation across datasets with different dimensionalities and class structures.