# Effective Heart Disease Prediction Using Machine Learning Techniques
## 3 Methodology
### Feature Selection and Reduction  
We propose the use of binning as a method for converting continuous input, such as age, into categorical input in order to improve the performance and interpretability of classification algorithms. By categorizing continuous input into distinct groups or bins, the algorithm is able to make distinctions between different classes of data based on specific values of the input variables. For instance, if the input variable is \"Age Group\" and the possible values are \"Young\", \"Middle-aged\", and \"Elderly\", a classification algorithm can use this information to separate the data into different classes or categories based on the age group of the individuals in the dataset [24]. Additionally, converting continuous input into categorical input through binning can also aid in the interpretability of the results, as it is easier to understand and interpret the relationship between the input variables and the output classes. On the other hand, continuous input, such as numerical values, can be more difficult to use in classification algorithms as the algorithm may have to make assumptions about where to draw boundaries between different classes or categories [25]. Figure 2: Boxplots of all attributes. In this study, we applied the method of binning to the attribute of age in a dataset of patients. The age of patients was initially given in days, but for better analysis and prediction, it was converted to years by dividing it by 365. The age data were then divided into bins of 5-year intervals, ranging from 0-20 to 95-100. The minimum age in the dataset is 30 years, and the maximum is 65, so the bin 30-35 is labeled as 0, while the last bin 60-65 is marked as 6. Furthermore, other attributes with continuous values, such as height, weight, ap_hi, and ap_lo, were also converted into categorical values. The results of this study demonstrate that converting continuous input into categorical input through binning can improve the performance and interpretability of classification algorithms. In this comprehensive study of US individuals who were unencumbered by clinical CVD at the outset, the participants had a high lifetime risk for developing CVD, and even higher for those who were overweight or obese. In comparison with those with a normal BMI, obese people were shown to have an earlier beginning of incident CVD, a larger percentage of life spent with CVD morbidity (unhealthy life years), and a lower overall survival rate [26]. This suggests that the attributes of height and weight can be converted to body mass index (BMI), which could improve the performance of our heart disease prediction model. The BMI values are then converted into categorical values for further analysis. \[\text{BMI}=\frac{\text{weight (kg/lb)}}{\text{height}^{2}\left(\text{m}^{2}/ \text{in}^{2}\right)}\]  
The average blood pressure a person has during a single cardiac cycle is known as mean arterial pressure (MAP) in medicine. MAP is a measure of peripheral resistance and cardiac output, and has been shown to be linked to significant CVD events in the ADVANCE study [27; 28]. In a research including people with type 2 diabetes, it was shown that for every 13 mmHg rise in MAP, the risk of CVD rose by 13%. Additionally, if MAP raises the risk of CVD in people with type 2 diabetes, it should also result in a higher number of CVD hospitalizations [28]. These findings suggest a direct relationship between MAP and CVD. Mean Arterial Pressure \((\text{MAP})=(2\) Diastolic Blood Pressure \(+\) Sistolic Blood Pressure\()/3\)  
We calculated the mean arterial pressure (MAP) from the diastolic blood pressure (ap_lo) and systolic blood pressure (ap_hi) data for each instance. Similar to the age attribute, the MAP data were divided into bins of 10 intervals, ranging from 70-80 to 110-120, and each bin was labeled with a categorical number, as shown in Table 3.  
As can be observed from Table 4, all the attribute values were converted to categorical values.