CARDIOSIGHT: Cardiovascular Risk Calculator using Artificial Intelligence

Guadalajara. Second Edition 2020 Did you know that cardiovascular diseases (CVD) are the main cause of death worldwide? In Mexico, 19% of women and men between 30 and 69 years old die from diseases...

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.

CARDIOSIGHT: Cardiovascular Risk Calculator using Artificial Intelligence

This archive includes automatic translations. Audio, video and text inside images remain in their original language.

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 (CVD) are the leading cause of death worldwide?

In Mexico, 19% of women and men aged 30 to 69 die from cardiovascular diseases, and it is estimated that 70.3% of the adult population lives with at least one cardiovascular risk factor.

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 population will have the ability to know their risk level without the need to attend a medical health unit. Thus accelerating the identification of high-risk individuals before a primary cardiovascular event develops.

● 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 found on the Kaggle page. Which consists of 70,000 data collected from patients, contains 11 characteristics and an objective variable, information collected through medical results, shared by the patient or factually.

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.

Figura 2. Modelo Random Forest

After carrying out several tests and tuning hyperparameters, the ideal model for our application was found.

With an accuracy of 0.73 and a ROC curve of 0.8, it was decided to obtain complementary graphs of the model to understand its probabilistic behavior in a deeper way.

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

As support for the selection of this cut-off point we rely on Youden's modulus, calibration graphs and the prediction values obtained.

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

It was possible to obtain an algorithm capable of indicating whether an individual is at high risk of suffering from cardiovascular disease or not, with results comparable to those mentioned in the bibliography consulted.

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 next steps, it is essential to work with a dataset focused on the Mexican population, with which a more in-depth analysis could be done regarding how dietary, social, economic and educational variables affect the predictions. In addition, a risk factor calculation algorithm could be created, focused on this population.

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

Open video or resource

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!

The mission of Saturdays.ai is to make artificial intelligence more accessible (#ai4all) through intensive courses and programs where projects for good are carried out (#ai4good).

Explore our AI master’s programme at https://saturdays.ai/master-ia-online/

If you want to learn more about artificial intelligence join our community at community.saturdays.ai or visit us on our website www.saturdays.ai Join us!

FROM CURIOSITY TO PRACTICE

Your next step starts here.

Put an idea into practice or find people to continue learning with.

Receive new stories in your RSS reader ↗

A history of the Saturdays.AI community. Originally published on March 16, 2022.

← More community stories