# Breast Cancer Classification Using an Adapted Bump-Hunting Algorithm
## 2 Material and Methods
### The Patient Rule Induction Method  
#### 2.3.1 Overview  
In a supervised learning environment, the Patient Rule Induction Method [3] is a bump-hunting algorithm that locates areas in the input variables subspace, selected by the decision maker, that are connected to the highest or lowest occurrence of a target label of a class variable.  
Two steps make up the Patient Rule Induction Method. The first phase is the top-down peeling, where the boxes are built and each box is bound by the variables defining the selected subspace, given a subset of the input variables subspace. The data analyst may control how many data are eliminated at each peel; typically, this amount is 5%, thus the name \"patient\". Due to earlier decisions made by suboptimal greed, the final box discovered after the peeling process might not be ideal.  
The boxes are extended by repeatedly extending their bounds as long as the result's density grows in the second PRIM phase, known as the bottom-up pasting. Figure 1 shows the PRIM's method for locating a box in the initial stage of top-down peeling. Up until halting requirements are met, these two procedures are continued iteratively to locate further areas. The PRIM is a greedy algorithm as a result. A collection of boxes or regions that provide rules connecting the targeted label of the dependent variable to the explanatory qualities in the data subspace initially selected by the analysts is the result of the PRIM.  
Even if the resulting areas and rules are actionable, the selection of variables can consistently alter the answer to the original problem since the search dimension is decided by a human component, making it possible to ignore important rules while attempting to forecast a phenomenon.  
Here is a more formal formulation of the problem to help better understand the search in the input space based on the type of variables and whether they are categorical or numeric:  
In the same dataset, let y be a target variable and p be the number of input variables represented by \(x_{1}\), \(x_{2}\)..., \(x_{\text{p}}\). It is necessary to reframe the problem as binary subproblems if y is a multiclass variable. Let \(S_{j}\) represent the range of values that \(x_{j}\) (j = 1,... p) can have. The input space is as follows:  
\[S=S_{1}*S_{2}*\ldots\ldots*S_{p} \tag{1}\]  
The objective is to find subregions \(R\subset S\) for which:  
\[\overline{y}_{R}\gg\overline{y} \tag{2}\]  
where \(\overline{y}\) is the global mean of y and \(\overline{y}_{R}\) is the mean of y in R.  
Let \(s_{i}\subset S_{i}\), we define a box:  
\[B=s_{1}*s_{2}*\ldots\ldots s_{p} \tag{3}\]  
where \(x\in B\equiv\bigcap_{j=1}^{p}(x_{j}\in s_{j})\). When \(s_{i}=S_{i}\), we leave \(x_{i}\) out of the box definition since it may take any value in its domain. Figure 2a shows an example of a box defined on two numeric variables, where \(x\in B\equiv x_{1}\in[a,b]\cap x_{2}\in[c,d]\). Figure 2b shows the definition of a box if the variables are categorical, where \(x\in B\equiv x_{1}\in\{a,b\}\cap x_{2}\in[c,d]\). A box can also be defined by numeric and categorical variables at the same time.  
Figure 1: The top-down peeling method used in the first phase of the PRIM to locate a single box is depicted in this picture. In fact, the algorithm peels the space’s dimensions one at a time while verifying the thresholds provided and whether the goal variable is satisfied until it reaches the bump and the area where the size exceeds the threshold. On the left, we can see the different iterations until we reach the interesting box on the right. Then, it iterates the process for the next box, starting with another dimension.