CARDIOSIGHT: Cardiovascular Risk Calculator using Artificial Intelligence
CardioSight explores a cardiovascular classification model using public data and a web interface. The article describes the process and its limitations.
A learning project shared by the community. The article documents its team, methods and results; it does not establish that the prototype is ready for real-world use.

Editorial note: this article documents an educational project and its results on the data used. It does not establish clinical validation or authorisation to diagnose or treat patients. Proposed healthcare applications are retained as the team’s goals, not demonstrated capabilities.
Guadalajara. Second Edition 2020
Did you know that cardiovascular diseases are a major cause of death worldwide?
Cardiovascular risk is an important public health issue in Mexico. The original version’s figures did not clearly identify their source, period and denominator, so they are not presented here as verified estimates.
Cardiovascular diseases are a group of disorders that affect the heart and/or blood vessels, which represent a public health problem in Mexico.
Epidemiological studies have identified a set of variables called cardiovascular risk factors (CVRF), which are all those non-modifiable biological characteristics and modifiable behavioral characteristics (lifestyles), whose presence is related to a greater probability of suffering from cardiovascular disease in the future. Its early identification is essential to implement changes in patient habits with the aim of preventing a primary cardiovascular disease event..
In recent years, Mexico has implemented several strategies focused on the health sector that promise good results. Despite this, inconsistencies have been found in primary care processes, clinical practice and surveillance instruments that limit cardiovascular monitoring of the population.
What is CARDIOSIGHT?
The project of CARDIOSIGHT was born due to the present need in our country to create early identification methods and tools for individuals at high risk of suffering from cardiovascular diseases. In order to prevent primary cardiac events and help reduce the incidence of new cases, through prevention habits. This detection method will be designed with the help of the artificial intelligence.
Advantages of the application:
● The proposal aims to let users explore an experimental indicator based on the information they enter. It does not replace medical assessment or establish a person’s future disease risk.
● After identification, depending on the result, the user will be suggested to visit the available pages of the Mexican Social Security Institute that provide information on current preventive campaigns related to this type of diseases, in which they will find the necessary information to educate themselves about the problem, in addition to the possibility of finding their nearest clinic to perform their first medical check-up.
Experimenting with data!
It was decided to work with dataset Cardiovascular Disease , available on Kaggle. It contains 70,000 records, 11 features and a target variable indicating the presence of cardiovascular disease. Classifying that variable is not the same as predicting a future event over a specified period.

Figure 1. Relationship between BMI (Body Mass Index) and the presence or absence of CVD.
After carrying out the exploratory analysis and transformation of our data, it was decided to experiment with the Random Forest due to its excellent classification capacity.

Figure 2. Random forest model
After several tests and hyperparameter adjustments, we selected the model for the prototype.
The model achieved 0.73 accuracy and an area under the ROC curve (AUC) of 0.8. We generated additional plots to examine its scores and calibration.

Figure 3. ROC curve and AUC
One of the biggest challenges in developing this project was finding a cut-off point to decide whether a person had a high or low risk of suffering from cardiovascular disease. This is where probabilistic trust comes into play, and also weighing which situation is better: Telling patients that they will have cardiovascular disease when they do not have it, or telling them no when they do. In my case, I preferred that my model identify the greatest number of people suffering from cardiovascular disease, with the premise that false positives can be detected by performing complementary clinical tests.

Figure 4. Relationship between probability and cut-off point
To choose the threshold, we used Youden’s index, calibration plots and the model’s predictions.

Figure 5. Calibration curve obtained
Because it was desired that the population could make use of this resource, it was decided to implement a web application using the platform streamlit. In which the user could consult their risk indicator by filling out their FRC. If your result was “High” you would be redirected to the official IMSS website.
Results
We obtained an experimental classifier for the dataset’s cardiovascular target variable. The reported results do not establish clinical validation, prevention of events or an ability to predict an individual’s future risk.
After an analysis of the predictive power of the data, it was found that having a degree of hypertension and being over 50 years of age can influence whether you are an individual at high risk. Cholesterol and body mass index are also characteristics to consider, since if their levels are higher than normal, they can also influence a higher risk. Early identification of these risk variables is essential to prevent a primary cardiovascular disease episode.
Is this all?
No, this project serves as a precedent to know if the methodology used is useful and what type of resources are necessary to carry out a more elaborate research focused on the Mexican population.
As a next step, the team proposes working with data representative of the Mexican population and examining dietary, social, economic and educational factors. Independent validation would also be needed before considering any clinical use.
It is desired to work more with the created algorithm, to improve its classification performance by applying feature selection and other algorithms machine learning.
There is still a lot to do, but this experimentation definitely gives direction to the next efforts, I invite you to follow me, so you can continue reading about this project.
Members
Rebeca Sarai Nuñez Ramirez
Project presentation: DemoDay
Repository
In the following repository you will find the code used to develop this application: https://github.com/SaturdaysAI/Projects/tree/master/Guadalajara/July2020/Cardiosight
More artificial intelligence!
Saturdays.AI makes AI more accessible through shared learning and projects with a social purpose. Our motto is AI4ALL IS AI4GOOD.
A story from the Saturdays.AI community. Originally published on March 16, 2022.
← More community stories


