# Breast Cancer Classification Using an Adapted Bump-Hunting Algorithm
## 2 Material and Methods
### The Patient Rule Induction Method
#### 2.3.2 The PRIM's Metrics  
Four metrics should be examined when assessing a box: the box's dimension, density, coverage, and support. First, we have the coverage. In relation to the total number of target cases in the dataset, it is the percentage of target cases (cases of interest) that are in the box. The following is the mathematical expression:  
\[coverage=\frac{Number\;of\;target\;points\;in\;the\;box}{Total\;number\;of\; target\;points\;in\;the\;dataset} \tag{4}\]  
The coverage begins at one and decreases as the algorithm advances because the PRIM is based on the unrestricted full set of cases, which comprises all outcomes of interest. A box that has a high coverage rate identifies the behavior of interest because it captures a greater percentage of the target cases. Although it may miss out on more general patterns or only apply to a small number of cases, low coverage can yield more accurate and useful insights. The box's ability to isolate the intended patterns or responses within the dataset is assessed with the aid of the coverage. Second, we have the support. The percentage of points from the dataset that falls inside a box is known as its support; in the python prim package, this is called _mass_, and it can be expressed mathematically as follows:  
\[mass=\frac{Number\;of\;points\;in\;the\;box}{Total\;number\;of\;points\;in\;the\;dataset} \tag{5}\]  
The mass helps determine the box's size. While a lower mass indicates a smaller amount of data captured, thereby focusing more on a subset that satisfies the box's criteria, a higher mass indicates a greater amount of data contained in the box, meaning it is less specific but more general. When identifying interesting regions within the data space, this statistic is essential for understanding the trade-off between the box's specificity and coverage. Third, we have the density of the box. In PRIM, the density is the same as the confidence level. It gauges the target cases' concentration inside the box, giving information about the box's purity with regard to the target cases. The density makes more sense with the PRIM because we work with rectangles or hyper-rectangles. The density can be expressed as follows:  
\[density=\frac{Number\;of\;target\;points\;in\;the\;box}{Total\;number\;of\;points\;in\;the\;box} \tag{6}\]  
Figure 2: An illustration of a box. (**a**) A box defined by numeric features. (**b**) A box defined by categorical features. A high density indicates that a greater percentage of the points in the box are target cases, indicating that the box is specifically targeted to the desired behavior or result. On the other hand, a lower density indicates that there are a lot of non-target cases in the box, which reduces its precision. The final metric is known as restricted dimensions (res dim). This metric suggests the number of variables that define a box. Knowing how many features are used to identify the target cases inside the box and assessing the complexity of the box are useful because they provide information about the patterns that are generated, as well as their specificity and interpretability. It measures the complexity of each box. Knowing how mass, density, and coverage relate to one another in the PRIM is essential to understanding how well a box represents the target cases. In contrast to the coverage, which calculates the proportion of target cases included in the box compared to all target cases in the dataset, the density displays the concentration of those target cases within the box, indicating their purity. A box with high coverage captures a lot of target cases, but its density might be low if it also contains a lot of non-target cases. This is the trade-off between capturing a lot of targets and maintaining specificity. The mass, on the other hand, shows what proportion of the entire dataset, including target and non-target cases, is contained in the box.