# A Random PRIM Based Algorithm for Interpretable Classification and Advanced Subgroup Discovery
## 4 Results
### Results  
Tables 5 and 6 summarize the results of the empirical comparison; they display the datasets and four scores that are measured for the classifiers produced by random forest, XG-Boost, logistic regression, and R-PRIM-Cl. The precision tells us how many of the positive predictions are true, the recall gauges how well the model can identify every positive case, and the F1 score is the harmonic mean of recall and precision that balances the trade-off between the two. The three reflect the importance of classifying positive examples. The most popular metric in machine learning is accuracy, which compares the number of true positives and true negatives to the total number of predictions to determine how accurate the model is. In this section, Table 5 displays the recall and the precision, and Table 6 shows the accuracy and the F1-score. The recall, precision, F1-score, accuracy, and evaluation of the R-PRIM-Cl algorithm across multiple datasets in Tables 5 and 6 show that it performs consistently well, frequently surpassing or closely matching other industry-leading algorithms such as random forest (RF), XG-Boost (XGB), and logistic regression (LG). R-PRIM-Cl performs well in terms of recall, especially when it comes to datasets like Cancer, Heart, and Credit, where it \begin{table}
\begin{tabular}{c l l} \hline \hline
**Algorithms** & **Hyperparameters** & **Tuning** \\ \hline \multirow{8}{*}{Random forest} & _n_estimators_: Number of trees in the forest & _n_estimators_ = _100_ \\  & _max_depth_: Maximum depth of the trees & _max_depth_ = _None_ \\  & _min_samples_split_: Minimum number of samples required to split an internal node & _min_samples_split_ = \(2\), \\  & _min_samples_leaf_: Minimum number of samples required to be at a leaf node & _min_samples_leaf_ = \(1\), \\  & _max_features_: Number of features to consider when looking for the best split & _max_features_ = _’sqrt’_, \\  & _class_weight_: Balancing of classes for imbalanced datasets & _class_weight_ = _’balanced’_ \\ \hline \multirow{4}{*}{XG-Boost} & _n_estimators_: Number of boosting rounds. & _n_estimators_ = _100_ \\  & _learning_rate_: Step size shrinkage used to prevent overfitting. & _learning_rate_ = _0.1_ \\  & _max_depth_: Maximum depth of a tree. & _max_depth_ = \(6\) \\  & _min_child_weight_: Minimum sum of instance weights needed in a child. & _min_child_weight_ = \(1\) \\  & _subsample_: Fraction of samples used for training each tree. & _subsample_ = _0.8_ \\  & _colsample_btree_: Fraction of features used for training each tree. & _colsample_btree_ = _0.8_ \\  & _scale_pos_weight_: Balancing factor for imbalanced datasets. & _scale_pos_weight_ = \(1\) \\ \hline \multirow{4}{*}{Logistic regression} & _penalty_: Regularization type (I1, I2, or clastient). & _penalty_ = _’12’_ \\  & _C_: Inverse of regularization strength (smaller values imply stronger regularization). & \(C\) = _1.0_ \\  & _solver_: Optimization algorithm for training. & _solver_ = _’lbfgs’_ \\ \cline{1-1}  & _class_weight_: Handling class imbalance & _class_weight_ = _’balanced’_ \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The hyperparameters tuned for each algorithm. attains the highest recall, proving that it is efficient in detecting true positive cases without overlooking pertinent cases. According to precision results, R-PRIM-Cl frequently has fewer false positives than other models and is very accurate in its positive predictions. This is especially true in datasets like Cancer, Diabetes, and Credit, in which the cost of false positives is high. The robust performance of R-PRIM-Cl is further highlighted by the F1-score, which provides a balance between recall and precision. It consistently manages false positives and false negatives with effectiveness, and it excels in the Cancer and Heart datasets in particular. Figure 7 offers a visualization of the performances of the four algorithms on the seven datasets for each measure, being Figure 7a for the accuracy, Figure 7b for the recall, Figure 7c for the precision, and Figure 7d for the F1-score.