# A Random PRIM Based Algorithm for Interpretable Classification and Advanced Subgroup Discovery
## 3 Proposed Methodology
### Random PRIM Based Classifier  
Based on the search strategy provided by PRIM, our algorithm includes additional steps to construct the classifier. The expert is still in charge of determining PRIM's parameters, though. Indeed, not setting any support threshold can be beneficial to subgroup discovery. These parameters are determined based on the particular field of work and the experimentation conducted by the analysts. As the peeling criteria, minimum support, and pasting criteria in PRIM need to be adjusted domain-specifically to match the objectives of the analysis and the particulars of the data; they are not entirely automated. Important trade-offs in subgroup discovery, like purity versus coverage, are controlled by these parameters, which must strike a balance between statistical significance and usefulness. Peeling criteria, for instance, dictate how harshly data points are eliminated, affecting the purity of subgroups, whereas minimum support guarantees that subgroups are sizable enough to have significance without being overly stringent to eliminate significant but uncommon patterns. Refining subgroup boundaries through pasting criteria necessitates careful adjustment to prevent overgeneralization. Setting requirements vary depending on the dataset and task; for example, large, high-dimensional datasets benefit from more relaxed settings, while small, noisy datasets may require stricter thresholds. Although automating these parameters might standardize results, it might not reveal useful patterns that are essential for practical applications. By permitting specialists to modify these standards, PRIM guarantees adaptability, resilience, and congruence with the particular priorities of the issue at hand. It is significant to remember that PRIM already has these parameters set by default to 5% for the peeling and pasting threshold. If the support is not set, PRIM continues searching for a region until it reaches an empty box as a stopping criterion.  
The detailed steps of the random PRIM-based classifier (R-PRIM-Cl) are outlined below.  
1. **Initialization step** 1. A set of \(N\)**data instances** 2. A set of \(P\)**categorical or numeric variables** as \(\mathbf{X}=\{\mathbf{x_{1}},\mathbf{x_{2}},\ldots,\mathbf{x_{p}}\}\)** 3. Two class labels target variable \(Y\in\{0,1\}\)** 4. Define a minimum **support, peeling, and pasting** thresholds \(\{\mathbf{s},\mathbf{\alpha},\mathbf{\beta}\}\) 5. **Procedure** 1. Random choice of the feature search spaces 2. Implementation of PRIM on each subspace for each class label 3. Find boxes with the metrics 4. Implement metarules to find the associations between rules 5. Execute cross-validation on 10 folds 6. Retain the rules or metarules based on cross-validation, the support, the density, and the coverage rates 7. Calculate the accuracy, recall, precision, and F1-Score to validate the model 8. **Output** 1. The set of all boxes found to allow the discovery of new subgroups 2. The set of selected boxes from the metarules pruning step 3. The final box measures: coverage, density, support, and dimension 4. The final model metrics: accuracy, precision, recall, and F1-score