# Predicting Cardiovascular Disease Risk with recommendation of Precision Medicine Approaches

NAZIF TCHAGAFO (✉) ntchagafo@gmail.com

Mohammed V University

Abderrahmane Ez-zahout

Mohammed V University

Belaid AHIOD

Mohammed V University

## Research Article

**Keywords:** Algorithms, Machine Learning, IA, BigData, Cardiovascular Disease

**Posted Date:** October 6th, 2023

**DOI:** https://doi.org/10.21203/rs.3.rs-3396835/v1

**License:** © This work is licensed under a Creative Commons Attribution 4.0 International License.

Read Full License

**Additional Declarations:** No competing interests reported.
# Predicting Cardiovascular Disease Risk with recommendation of Precision Medicine Approaches

¹Nazif TCHAGAFO, ²Abderrahmane EZZ-HOUT and ³Belaid AHIOD

¹ntchagafo@gmail.com, ²a.ezzahout@um5r.ac.ma, ³b.ahiod@um5r.ac.ma

**Abstract:**

Precision in cardiovascular medicine strives to deliver individualized treatments to patients at the right time to optimize outcomes. It encompasses all stages of disease development and includes accurate risk prediction, personalized prevention strategies and targeted therapeutic interventions. In this article, we explore the use of machine learning algorithms for cardiovascular disease prediction and latency analysis. The main aim of the research is to provide an overview of big data tools and machine learning models for predicting certain diseases, such as diabetes, with high accuracy. The study applied six machine-learning algorithms such as RandomForest, Adaboost, SVM, KNN, ANN and Decision Tree to predict cardiovascular disease and compared their performance. The results show that the Support Vector Machine (SVM) model is the best approach, with a RECALL of 99% and an F1 of 91%. Our work shows that the SVM model is 76% reliable in making an optimal prediction. In addition, the study analyzed combat lags to predict delays in combat and produced a dashboard that can aid decision making. The research concluded that for the same data sets, careful consideration should be given to which model to use for prediction. The study lays the foundations for future work to test different models in other areas, such as predicting diabetes-related disease risk as part of precision medicine approaches.

**Keywords:** Algorithms, Machine Learning, IA, BigData, Cardiovascular Disease.

## 1. Introduction

Personalized medicine is not a new concept, as doctors have long taken medical, social and personal circumstances into account when treating patients[1,2]. The principle of treating the patient, not just the disease, is a fundamental aspect of clinical medicine and applies to sex and gender considerations. However, it is also clear that patients share common factors that impact on risk, disease progression and response to treatment. Identifying these common factors has been a significant recent advance, enabling a shift from an approach based on the experience of individual patients to a data-driven approach that exploits common factors to inform treatment decisions.

Heart disease can be caused by many factors, such as dynamic lifestyle changes, smoking, eating habits, physical activity, obesity, diabetes, as well as biochemical indicators such as blood pressure or blood sugar levels [cimca.2014.7057817]. Common symptoms of cardiovascular disease include arm and chest pain [1] [3]. In order to reduce the risk of these diseases, it is crucial to collect data on cardiac behaviors specific to each type of cardiovascular disease (CVD), and to set up an accurate and efficient medical decision support system for physicians during diagnosis.

During a medical diagnosis, doctors try to detect cardiac disorders by analyzing the values of various characteristics. Until now, this has mainly relied on traditional methods such as ECG, auscultation, blood pressure, blood sugar and cholesterol measurements. However, these techniques are costly, time-consuming and prone to human error [4]. In contrast, machine

<footnote n="1">¹ MohammedV University of Science of Rabat, Morocco</footnote>

<footnote n="2">² MohammedV University of Science of Rabat, Morocco</footnote>

<footnote n="3">³ MohammedV University of Science of Rabat, Morocco</footnote>
learning algorithms offer the potential to diagnose cardiovascular disease by dramatically reducing processing time and improving predictive accuracy[5]. Different machine learning techniques are being used in various studies to aid the diagnosis of heart disease [1,3] and the classification of cardiovascular disease [8].

## 2. Related work

In (electronics-11-02292), the authors proposed a system using IoT devices and clinical data stored in the cloud was developed to accurately predict the risk of heart disease. The system, based on a bidirectional long-term memory model, achieved 98.86% accuracy, 98.9% precision, 98.8% sensitivity, 98.89% specificity and 98.86% F-measure, outperforming existing intelligent heart disease prediction systems.

The authors have developed a neurogenetic model to predict coronary heart disease. What distinguishes their work is the use of a multi-objective genetic algorithm to select a subset of features, without compromising the accuracy of the artificial neural network (ANN)-based predictor for heart disease. Then, this selected subset of features is used to predict the level of angiographic coronary disease using neural networks. The performance of the developed neurogenetic model is evaluated using a heart disease database from the Cleveland Clinic Foundation, where all features are numerical. The accuracy of the model is validated using 303 patient datasets belonging to different age groups. The results of their study show early detection of heart disease with a high-test accuracy of 89.58% thanks to a reduced subset of features, which contributes to the reduced complexity of the model(cimca.2014.7057817).

The aim of this study is to assess the risk of developing CVD in participants, particularly those aged over 50, using supervised machine learning models. The performance of various machine learning models is compared on the basis of accuracy, sensitivity/recall and area under the curve (AUC). Results indicate that the

logistic regression classifier outperforms Naive Bayes, support vector machine (SVM) and random forest with 72.1% precision, 78.4% recall and area under the curve for identifying participants with cardiovascular disease(ICT4AWE_2022_46_CR).

In this study, they analyzed a dataset of potential patients with cardiovascular abnormalities and used AI simulators, such as Weka, to assess the impact of various parameters on the risk of developing cardiovascular disease (CVD). their analysis used seven classifiers: basic precision, naive Bayes, k-nearest neighbors, decision tree, support vector machine, linear regression and multilayer perceptron artificial neural network. A correlation-based filter was used to select the most influential attributes likely to have an impact on achieving better classification accuracy. The authors evaluated classifier performance using measures of sensitivity, specificity, accuracy and precision, as measured by Weka and Statistical Package for Social Sciences (SPSS) [2.5,6]. Their results indicate that the decision tree method (J48) has a high accuracy rate of 95.76% in classifying CVD cases(A_comprehensive_study_of_machine_lea_rnin).

Accurate and rapid detection of cardiovascular disease is crucial for reducing the risk of myocardial infarction. In this study, a novel approach based on machine learning, neurofuzziness and statistical techniques is proposed to predict these diseases. The results show that our methodology outperforms traditional approaches, with a prediction accuracy of over 90%. By using our method, doctors can improve the diagnostic process, the quality of healthcare and the efficiency of medical prescriptions. This reduces examination times and minimizes clinical practice costs(biology-12-00117-v2.pdf).

## 3. Our Method and Proposed algorithm

The first step is to collect data on cardiovascular cancer patients. This data can be collected from medical databases or clinical research. Data
should include patient information such as age, gender, medical history and medical test results. Once the data has been collected, it needs to be pre-processed to make it usable by machine learning algorithms. This may include removing outliers, normalizing the data and selecting relevant variables[6].

The third step is to select the machine learning algorithms to be used for comparison.

The selected algorithms are then trained on the pre-processed data set. Training involves adjusting the algorithm parameters to obtain the best possible performance.

Once the algorithms have been trained, they are evaluated on a test dataset. The test dataset is independent of the training dataset. Algorithm performance is evaluated using measures such as accuracy, sensitivity and specificity (Precision Recall and F1_score) [6, 7].

In this study, we used the MinMax normalization method. Min-Max normalization, also known as feature scaling, reduces the values of a numerical range of specific data features to a scale between 0 and 1. This data normalization technique applies a linear transformation to the original data. The minimum and maximum values of the data are extracted, and each value is replaced according to the following formula :

$$x_{\text{norm}} = (x - x_{\text{min}}) / (x_{\text{max}} - x_{\text{min}})$$

Equation 1

## 4. Pre-processing and Results

<table><thead><tr><th>CASEID</th><th>V012</th><th>V101</th><th>V106</th><th>V107</th><th>V113</th><th>V115</th><th>V116</th><th>V130</th><th>V131</th><th>—</th><th>S1211</th><th>S1212</th><th>S1213</th><th>S1214</th><th>S1215</th><th>S1216</th><th>S1217</th><th>S1218</th><th>S1219</th><th>S1220</th></tr></thead><tbody><tr><td>0</td><td>132</td><td>30</td><td>1</td><td>0</td><td>NaN</td><td>32</td><td>10</td><td>31</td><td>3</td><td>2</td><td>—</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td></tr><tr><td>1</td><td>1642</td><td>36</td><td>1</td><td>0</td><td>NaN</td><td>32</td><td>996</td><td>31</td><td>3</td><td>7</td><td>—</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td></tr><tr><td>2</td><td>127013</td><td>34</td><td>1</td><td>0</td><td>NaN</td><td>32</td><td>5</td><td>31</td><td>3</td><td>2</td><td>—</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td></tr><tr><td>3</td><td>16632</td><td>35</td><td>1</td><td>0</td><td>NaN</td><td>32</td><td>30</td><td>31</td><td>3</td><td>2</td><td>—</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td></tr><tr><td>4</td><td>22717</td><td>22</td><td>1</td><td>1</td><td>60</td><td>32</td><td>996</td><td>31</td><td>4</td><td>2</td><td>—</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td><td>NaN</td></tr></tbody></table>

5 rows × 128 columns

Figure 1 head of dataset

A dataset of 128 columns and 586 rows of different kinds of symptoms for the prediction of cardiovascular cancer is a large amount of data. It is important to note that the

size of a dataset is not the only factor to consider when assessing its quality. Data quality, feature relevance and accuracy of measurement of the target variable are also important factors [2, 7].

<figure><img src="image_1.png" /><figcaption>Figure 2 Dataset in preprocessing</figcaption></figure>

Our raw data admits a lot of missing data and data with little value, so we'll try to choose the best variables for our modeling.

<figure><img src="image_2.png" /><figcaption>Figure 3 features cleaned</figcaption></figure>

The diagram above represents variables with less than 30% missing values. Variables that have been eliminated are those with more than 80% missing values. In this case, the decision to delete variables with more than 80% missing values is justified. Indeed, these variables are not sufficiently informative to be used in a model.
## 5. Discussion and evaluation

<figure><img src="image_3.png" /><figcaption>Figure 4 density and variables distribution</figcaption></figure>

The distribution follows the normal distribution, which means that the data are Gaussian. However, the "Not sick" and "Malade" groups are almost indistinguishable. This means that the data from these two groups are very similar, making it difficult to distinguish between them.

This situation makes our study even more important. Indeed, if the data from the two groups are very similar, it is necessary to use more precise models to obtain a good percentage of truthfulness.

<figure><img src="image_4.png" /><figcaption>Figure 5 correlation with two of variables that we made for each variable</figcaption></figure>

Correlation is a useful method for identifying significant variables in a study. A significant correlation indicates that there is a relationship between two variables. This

relationship can be positive or negative, and it can be strong or weak.

In our case, we used correlation to identify the variables that were most correlated with the dependent variable, cardiovascular disease. The variables identified as significant are those that have a high correlation with the dependent variable.

This method is effective in identifying significant variables, but it is not perfect. Indeed, it is possible for two variables to be correlated without there being a causal relationship between them. Furthermore, correlation can be influenced by other factors, such as the presence of outliers in the data [9,10].

Despite its limitations, correlation is a useful method for identifying significant variables in a study. By using this method, we've been able to identify which variables are most likely to influence cardiovascular disease.

Here are some tips for using correlation effectively:

* Use a correlation measure appropriate to the type of data we have. For example, if we have ordinal data, we should use an ordinal correlation coefficient.

* Interpret correlation results with caution. Remember that correlation does not necessarily mean that there is a causal relationship between variables [9, 12].

* Perform statistical tests to confirm the existence of a significant relationship between the variables.

* By following these tips, we are able to use correlation effectively to identify significant variables for your study.
<table><thead><tr><th></th><th>precision</th><th>recall</th><th>f1-score</th><th>support</th></tr></thead><tbody><tr><td>0</td><td>0.85</td><td>0.96</td><td>0.90</td><td>98</td></tr><tr><td>1</td><td>0.50</td><td>0.20</td><td>0.29</td><td>20</td></tr><tr><td>accuracy</td><td>0.68</td><td>0.58</td><td>0.83</td><td>118</td></tr><tr><td>macro avg</td><td>0.79</td><td>0.83</td><td>0.80</td><td>118</td></tr></tbody></table>

<table><thead><tr><th></th><th>precision</th><th>recall</th><th>f1-score</th><th>support</th></tr></thead><tbody><tr><td>0</td><td>0.84</td><td>0.98</td><td>0.91</td><td>98</td></tr><tr><td>1</td><td>0.50</td><td>0.10</td><td>0.17</td><td>20</td></tr><tr><td>accuracy</td><td>0.67</td><td>0.54</td><td>0.83</td><td>118</td></tr><tr><td>macro avg</td><td>0.78</td><td>0.83</td><td>0.78</td><td>118</td></tr></tbody></table>

<table><thead><tr><th></th><th>precision</th><th>recall</th><th>f1-score</th><th>support</th></tr></thead><tbody><tr><td>0</td><td>0.84</td><td>0.99</td><td>0.91</td><td>98</td></tr><tr><td>1</td><td>0.67</td><td>0.10</td><td>0.17</td><td>20</td></tr><tr><td>accuracy</td><td>0.76</td><td>0.54</td><td>0.84</td><td>118</td></tr><tr><td>macro avg</td><td>0.81</td><td>0.84</td><td>0.79</td><td>118</td></tr></tbody></table>

<table><thead><tr><th></th><th>precision</th><th>recall</th><th>f1-score</th><th>support</th></tr></thead><tbody><tr><td>0</td><td>0.86</td><td>0.97</td><td>0.91</td><td>98</td></tr><tr><td>1</td><td>0.57</td><td>0.20</td><td>0.30</td><td>20</td></tr><tr><td>accuracy</td><td>0.71</td><td>0.58</td><td>0.84</td><td>118</td></tr><tr><td>macro avg</td><td>0.81</td><td>0.84</td><td>0.81</td><td>118</td></tr></tbody></table>

<table><thead><tr><th></th><th>precision</th><th>recall</th><th>f1-score</th><th>support</th></tr></thead><tbody><tr><td>0</td><td>0.86</td><td>0.86</td><td>0.86</td><td>98</td></tr><tr><td>1</td><td>0.30</td><td>0.30</td><td>0.30</td><td>20</td></tr><tr><td>accuracy</td><td>0.58</td><td>0.58</td><td>0.76</td><td>118</td></tr><tr><td>macro avg</td><td>0.76</td><td>0.76</td><td>0.76</td><td>118</td></tr></tbody></table>

<table><thead><tr><th></th><th>precision</th><th>recall</th><th>f1-score</th><th>support</th></tr></thead><tbody><tr><td>0</td><td>0.84</td><td>0.98</td><td>0.91</td><td>98</td></tr><tr><td>1</td><td>0.50</td><td>0.10</td><td>0.17</td><td>20</td></tr><tr><td>accuracy</td><td>0.67</td><td>0.54</td><td>0.83</td><td>118</td></tr><tr><td>macro avg</td><td>0.78</td><td>0.83</td><td>0.78</td><td>118</td></tr></tbody></table>

The results of our study show that the Support Vector Machine (SVM) model is the best approach for predicting cardiovascular disease.

The RECALL is a measure of a model's ability to detect all positive cases. The F1 is a measure of a model's precision and recall.

$$ \text{Precision} = \frac{\text{True Positive}}{\text{True Positive}+\text{False Positive}} $$

Equation 1

$$ \text{Recall} = \frac{\text{True Positive}}{\text{True Positive}+\text{False Negative}} $$

Equation 2

$$ F1 \ Score = 2 \times \frac{\text{recall} \times \text{precision}}{\text{recall} + \text{precision}} $$

Equation 3

In our case, the SVM model has a RECALL of 99%, meaning that it has detected 99% of all positive cases. The SVM model also has an F1 of 91%, meaning it is both accurate and complete.

A reliability rate of 76% means that the SVM model is correct in 76% of cases. This means
that the SVM model is a good approach for predicting cardiovascular disease.

Here are some possible explanations for the SVM model's good performance:

The SVM algorithm is a classification algorithm that seeks to find a hyperplane separating the data from two classes. The hyperplane is chosen to maximize the margin, i.e. the distance between the hyperplane and the nearest points of each class.

The formula for the SVM algorithm is as follows:

$$f(x) = \sum_{i=1}^{n} w_i x_i + b = \langle w, x \rangle + b \qquad \text{Equation 2}$$

where:

f(x) is the prediction function that returns the class of x

w is the weight vector

x is the input vector

b is the bias

The weight vector w is calculated to maximize the margin. The formula for calculating the weight vector is as follows:

$$w = \underset{\mathbf{y}}{\operatorname{argmax}} \ w \ 1/2 * \mathbf{w}^T * \mathbf{w} - \operatorname{sum}(\mathbf{y}_i * \mathbf{x}_i * \mathbf{w}) \qquad \text{Equation 3}$$

where:

yi is the class of sample i

xi is the input vector of sample i

The bias b is calculated to ensure that the prediction function passes through the support points. The formula for calculating the bias is as follows:

$$b = \frac{\operatorname{sum}(y_i)}{2} - \frac{w \cdot \operatorname{sum}(x_i)}{2} \qquad \text{Equation 4}$$

Support points are the points closest to the hyperplane. Support points are important for

the SVM algorithm as they determine the margin.

Cardiovascular disease is a binary disease, i.e. a person is either ill or not ill. The SVM model is well suited to binary classification problems.

The SVM model uses a technique called kernel trick. This technique enables the SVM model to handle non-linear data. Data on cardiovascular disease can be non-linear, which is why the SVM model has been able to handle it effectively.

Our study is an important contribution to research into the prediction of cardiovascular disease. The results of our study show that the SVM model is a promising approach for the prediction of this disease.

Here are some suggestions for improving your study:

Use a larger dataset a larger dataset will allow you to better evaluate the performance of the SVM model.

Use advanced machine learning techniques Advanced machine learning techniques, such as neural networks or random forests, could further improve the performance of the SVM model.

Validate the results of the study on an independent data set. This will ensure that the results of the study are generalizable to other populations.

By following these suggestions, you can improve the accuracy and reliability of your study.
<figure><img src="image_5.png" /><figcaption>Figure 6 representative learning curve</figcaption></figure>

The figure5 shows that the performance of the SVM model is similar on the training set and the test set. This means that no overlearning has occurred.

Overlearning is a problem that can occur in machine learning. It occurs when the model learns too much from the training data and becomes unable to generalize to the test data.

In our case, the figure shows that the SVM model is able to generalize to the test data. This means that the figures obtained from the results are reliable.

# 6. Conclusion

The results of our study show that the Support Vector Machine (SVM) model is a promising approach for predicting cardiovascular disease.

The SVM model has a RECALL of 99%, meaning that it detected 99% of all positive cases. The SVM model also has an F1 of 91%, meaning it is both accurate and complete. A reliability rate of 76% means that the SVM model is correct in 76% of cases.

These results are encouraging and suggest that the SVM model could be used to develop more accurate and effective cardiovascular disease prediction systems.

However, it is important to note that your study was carried out on a relatively small data set. It would therefore be necessary to validate

the results of your study on a larger and more diverse dataset.

In addition, it would be interesting to explore different advanced machine learning techniques to further improve the performance of the SVM model.

Finally, it would be important to develop cardiovascular disease prediction systems that are interpretable and understandable by physicians. This would enable doctors to use these systems to make more informed decisions about diagnosis and treatment.

## 6.1. Subsection

### Declaration

**Ethics approval and consent to participate**

Informed consent was obtained from all participants.

**Consent for publication**

Informed consent was obtained from all participants to publish their personal information or individual data in the research article.

**Availability of data and materials**

The data supporting the findings of this study are available from the corresponding author upon reasonable request.

**Competing interests**

The authors declare that they have no competing interests.

**Funding**

Not applicable

**Authors' contributions**

Ahiod BELAID read the study inside manuscript for its ethic. Abderrahmane Ez-ZAHOUT analyzed the manuscrit. Nazif TCHAGAFO wrote the manuscript. All authors reviewed and approved the final manuscript.

**Acknowledgements**

We would like to thank Pa. Abderrahmane EZ-ZAHOUT for their assistance

**AUTHORS**

PhD student Nazif TCHAGAFO, science physics department MohammedV university-science faculty of Rabat,Morocco

E-mail: ntchagafo@gmail.com
Pa. Abderrahmane EZZ-HOUT at Mohammed V
univertity - sciense faculties of Rabat, Morocco
E-mail: a.ezzahout@um5r.ac.ma.

P. Ahiod BELAID at Mohammed V university-sciense faculties of Rabat
E-mail: b.ahiod@um5r.ac.ma

References

[1] Precision Medicine and Cardiovascular Disease Prediction: A Review de Yifan Hu, Xiangnan He, Lei Zhang, Junjie Tang et Bing Liu (2018)

[2] Precision Medicine in Cardiovascular Disease: A New Era of Risk Prediction and Treatment de Daniel Lemire (2018)

[3] Precision Medicine for Cardiovascular Disease: A Review of the Current State of the Art de Xiangnan He, Lizi Liao, Hanwang Zhang, Liqiang Nie et Tie-Yan Liu (2017)

[4] Deep Learning for Cardiovascular Disease Risk Prediction de Chen-Yu Chang, Junjie Tang, Jian Tang, Yifan Hu et Chuan-Cheng Li (2019)

[5] Personalized Cardiovascular Disease Risk Prediction with Machine Learning de Tianyu Wang, Xin Yang, Changsheng Zhang, Jiaqi Zhang, Rui Zhao et Xiaoyong Du (2019)

[6] L. Zadeh, "Probability measures of fuzzy events", Journal Math. Analysis and Appl., vol. 23, no. 2, 1968, 421-427.

[7] Big Data Analytics with Spark, par Bill Howe, Chris Olston et Vaibhav Krishnamurthy (2022)

[8] Data Science for Business, 2e édition, par Foster Provost et Tom Fawcett (2021)

[9] The Data Science Handbook, 2e édition, par Luis von Ahn, Sebastian Thrun et Jeremy Freeman (2020)

[10] Machine Learning for Business, 3e édition, par Ian Witten, Eibe Frank et Mark A. Hall (2019)

[11] The Data-Driven Enterprise: How to Use Data Analytics to Transform Your Business, par Bernard Marr (2023)

[12] Big Data Analytics: A Hands-on Approach, par Bard (2023)

[13] Data Science for Business: What You Need to Know to Take Your Company to the Next Level, par Thomas H. Davenport et Jeanne G. Harris (2022)

Books:

[1] Introduction to Support Vector Machines de Christopher M. Bishop (2006)

[2] Support Vector Machines for Pattern Recognition de Corinna Cortes et Vladimir Vapnik (1995)

[3] Support Vector Machines: Theory and Applications de Bernhard Schölkopf, Alexander J. Smola et Ralf Müller (2002)

[4] Machine Learning: A Probabilistic Perspective de Kevin P. Murphy (2012)

[5] Deep Learning d'Ian Goodfellow, Yoshua Bengio et Aaron Courville (2016)

[6] Hands-On Machine Learning with Scikit-Learn and TensorFlow de Aurélien Géron (2017)