HeartAI — Making Cardiovascular Risk Analysis More Understandable

INSPIRATION

Cardiovascular diseases are a major global health concern, and understanding the factors associated with heart disease can be challenging when clinical information is presented only as numbers and medical terminology.

I wanted to explore how artificial intelligence and interactive visualization could make cardiovascular risk analysis easier to understand. This idea inspired me to build HeartAI, a web application that combines machine learning predictions, clinical inputs, model insights, and an interactive 3D heart model in one interface.

My goal was to demonstrate how AI can help users explore cardiovascular data in a more interactive and accessible way while recognizing that machine learning predictions are not a substitute for professional medical evaluation.

WHAT IT DOES

HeartAI is an experimental cardiovascular risk analysis platform that uses machine learning models to generate predictions from clinical input features.

The application includes:

Cardiovascular Prediction: Generates predictions for coronary artery disease (CAD) and three coronary vessels: the left anterior descending artery (LAD), left circumflex artery (LCX), and right coronary artery (RCA).

Interactive 3D Heart Visualization: Displays a 3D anatomical model of the heart to provide visual context while exploring cardiovascular information.

AI Insights: Presents model-related visualizations and feature-importance information to help users explore the model's outputs.

Model Performance Dashboard: Displays evaluation metrics such as accuracy, precision, recall, F1-score, and ROC-AUC.

Clinical Input Interface: Allows users to enter clinical parameters and explore the resulting model predictions through a unified dashboard.

The 3D model serves as an anatomical reference; it does not identify or display a predicted blockage location.

HOW I BUILT IT

I built HeartAI as a web application with a React-based frontend and a Python Flask backend.

Frontend: I used React.js and Vite to develop the user interface and organize the application into different pages and interactive components. CSS helped me style the dashboard and present information clearly.

3D Visualization: I integrated a 3D heart model using Three.js to provide an anatomical reference within the application.

Backend: I used Python and Flask to handle backend functionality and connect the frontend to the machine learning prediction system.

Machine Learning: I worked with the Z-Alizadeh Sani cardiovascular dataset, containing 303 records and 59 columns, to explore cardiovascular disease prediction.

I developed separate models for CAD and the LAD, LCX, and RCA targets. The application presents model predictions alongside evaluation metrics to demonstrate both the prediction workflow and the models' measured performance.

I also paid attention to separating prediction targets from input features to reduce target leakage and make the modeling process more appropriate.

Integration: One of my key tasks was bringing the different components together into a single application: clinical inputs, machine learning predictions, AI insights, model evaluation, and 3D visualization.

CHALLENGES I FACED

One of my main challenges was integrating machine learning functionality with an interactive web interface. The application needed to accept clinical inputs, process them through the backend, and present the results in a way that was understandable to users.

Another challenge was working with a relatively small dataset. With only 303 records, it is important to be cautious when interpreting model performance and avoid assuming that results will generalize to other populations or clinical settings.

I also had to distinguish between visual explanation and actual model capability. Although the 3D heart model adds anatomical context, it does not provide the spatial information required to map predictions to specific physical locations on the heart. I therefore use it as a reference visualization rather than presenting it as a prediction of blockage location.

Finally, communicating model performance responsibly was important. Metrics such as accuracy alone do not tell the entire story, so I included multiple evaluation measures to provide a broader view of the models' behavior.

WHAT I LEARNED

Building HeartAI gave me practical experience in connecting machine learning with a full-stack web application.

Through this project, I explored integrating machine learning models into a Flask backend, building interactive dashboards using React, incorporating 3D visualization into a web application, and presenting model evaluation metrics in an accessible format.

I also learned about the importance of preventing data leakage, evaluating models carefully, recognizing the limitations of small datasets, and communicating the capabilities and limitations of AI responsibly.

The project helped me appreciate that building an AI-powered application involves more than training a model. Data quality, backend integration, interface design, visualization, evaluation, and responsible communication all play important roles.

WHAT'S NEXT?

I would like to improve HeartAI by exploring more robust validation strategies, evaluating models on independent datasets, improving the interpretability of predictions, and refining the user experience.

With appropriate data, external validation, and expert collaboration, future iterations could investigate how to make cardiovascular risk analysis tools more reliable and useful in research and educational settings.

FINAL THOUGHTS

HeartAI represents my exploration of how machine learning, clinical data, and interactive visualization can work together in a single application.

Built for the IIT Mandi Multimodal AI Hackathon 2026, this project is a step toward understanding how AI-powered tools can make complex data easier to explore while keeping transparency, limitations, and responsible use at the center of the experience.

DISCLAIMER

HeartAI is an experimental educational project, not a clinically validated medical device. Its predictions must not be used to diagnose cardiovascular disease or guide treatment. Always consult a qualified healthcare professional for medical advice.

Share this project:

Updates

Submission history