# Semi-Automatic Adaptation of Diagnostic Rules in the Case-Based Reasoning Process
## 3 Results and Discussion
### Experiments  
We generated several decision models using selected algorithms like ctree, C5.0, rpart, and C4.5 with the results presented in Tables 2 and 3. The clustering functionality is primarily designed for large datasets. The HDD is a relatively small sample; therefore, we used the best model from Table 2. It is visualized in Figure 8, where we can see that number of rules is 6. Among the most important decision attributes used for division in not leaf nodes were used attributes that, age, slope, exang, and sex. From this model we extracted the rules and sub-rules. The total number of sub-rules is 12, and their combinations create a specific rule. For example, the first rule consists of sub-rules L1, R2, and L3, see Figure 9. The sub-rules mainly contained categorical variables like tha \begin{table}
\begin{tabular}{c c c c} \hline
**Attribute Name** & **Attribute Description** & **Attribute Type** & **Range of Values** \\ \hline _Thalach_ & Maximum heart rate achieved & Numerical & \\  & (maximum number of beats the & \\  & heart can perform in one minute) & & \textless{}60 do\textgreater{} \\ _Evang_ & Occurrence of chest & Binary & 0 (no), 1 (yes) \\  & pain during exercise & \\ _Oldpeak_ & ST depression induced by & Numerical & \textless{}\textless{}\textless{}\textgreater{}2.9, 6\textgreater{} \\  & exercise relative to rest & & 0 (downsloping), \\ _Slope_ & The slope of the peak & Categorical & 1 (flat), \\  & exercise ST segment & & 2 (upsloping) \\ _Ca_ & Number of major vessels (0-3) & Categorical & 0,1,2,3 \\  & colored by fluoroscopy & & 0 (the patient did not have a heart problem), \\ _Thal_ & Thallium heart scan & Categorical & 1 (patient overcame a heart problem), \\  & & & 2 (blood flow is blocked) \\ _Num_ & Diagnosis of heart disease & Binary & 0 (the patient does not have heart disease), \\  & (angiogenic disease status) & & 1 (the patient has heart disease) \\ \hline \end{tabular} We tested both modules and the whole DSS using the prepared data sample.  
\end{table} 
Table 1: _Cont._ \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline
**Ratio** & **DT Type** & **\%** & **Ratio** & **DT Type** & **\%** & **Ratio** & **DT Type** & **\%** \\ \hline
60/40 & & & 70/30 & & 80/20 & & 90/10 & & \\  & ctree & 80.6\% & & ctree & 80.4\% & & ctree & 82.2\% & & ctree & 83.3\% \\  & C5.0 & 80.6\% & & C5.0 & 78.5\% & & C5.0 & 76.2\% & & C5.0 & 84.5\% \\  & rpart & 86.2\% & & rpart & **86.6\%** & & rpart & 85.4\% & & rpart & 84.9\% \\  & C4.5 & & & C4.5 & & C4.5 & & C4.5 & & C4.5 \\ \hline \end{tabular}
\end{table} 
Table 2: The models’ accuracy without the clustering method. \begin{table}
\begin{tabular}{c c c c c c} \hline
**Number of Clusters** & **60/40** & **70/30** & **80/20** & **90/10** \\ \hline
2 & 85.1\% & 86.5\% & 87\% & 87.3\% \\
3 & 87.7\% & 86.3\% & 88.2\% & **89.4\%** \\
4 & 85.1\% & 88.2\% & 85.8\% & 86.1\% \\ \hline \end{tabular}
\end{table} 
Table 3: The models’ accuracy with the clustering method. The other rules were formed by following conjunctions: 2(L1,R2,R3,R4), 3(R1), 4(L1,L2), 5(L1,R2,R3,L4,L5), and 6(L1,R2,R3,L4,R5). Most patients were covered by rule 4, i.e., sub-rule L1 and L2. We tested the similarity calculation for three new patients. **Patient no.1**  
age exang thal
1 56 1 0  
DSS found these sub-rules covering the patient 1:  
[1] \"L1\" \"R2\" \"R4\"  
The system calculated the highest similarity for L1, R2, R3, R4, namely 75% and score value 1 (operation of insertion in the sub-rule R3). This condition covered 15 historical  
Figure 8: The DSS visualizes best decision model based on the accuracy metrics. The color and shade of nodes signalize the prevalent class in that node (blue for patients without and pink for patients with heart disease). The box’s first value represents the target attribute value—1 (patient suffers from heart disease), 0 (patient doesn’t suffer from heart disease). The second value is the probability of occurrence of heart disease. The third value is what percentage of patients in each branch who suffer/not suffer from heart disease.