|
FreeLeeGo Logo
Main project
Thumbnail 1
Thumbnail 2
Thumbnail 3
Thumbnail 4
Thumbnail 5
Thumbnail 6

AI & Machine Learning

CardioPredict

Client: Self

The Challenge

The primary challenge was to create an accessible, user-friendly tool to predict heart attack risk. Clinical risk assessment involves numerous, complex variables (e.g., lifestyle, biometrics, personal history), making it difficult for non-technical users to get a quick, data-driven assessment. We needed a system that could not only build an accurate predictive model from this complex data but also present it to a user in a simple, interactive web interface, moving beyond simple command-line scripts.

Our Solution

We developed a full-stack machine learning web application using Django and Scikit-learn. The core of the solution is a RandomForestClassifier model, pre-trained and bundled into an sklearn Pipeline to automatically handle all data preprocessing. This model is served by a Django backend that provides a clean, interactive UI with two primary functions: Single Prediction: A web form for real-time risk assessment of an individual patient. Batch Prediction: A CSV upload feature to process and score multiple patients at once.

About the Project

This project integrates a robust machine learning model directly into a user-facing web application. The backend model was built using a RandomForestClassifier on cleaned cardiovascular data. A sophisticated Pipeline was constructed to automatically handle mixed data types (imputing missing values, scaling numeric features, and one-hot encoding categorical features) before feeding them to the model. The entire pipeline was serialized and is loaded by the Django application. The UI is designed for usability, allowing users to either fill out a detailed form or upload a CSV file. The app returns a clear “Yes/No” risk diagnosis along with a precise “Risk Probability” percentage, and it can display full tables of results for batch uploads. The “Graphs” tab offers transparency by displaying the model's own performance metrics, including its learning curve and confusion matrix.

Project Owner

Mohammad Tahmim Tasin

Mohammad Tahmim Tasin

Co-Founder & Chief Technology Officer

Tasin is a full-stack web developer and a pivotal lead engineer within our team, known for spearheading the development of advanced web applications. He possesses a deep expertise in constructing modern, scalable digital solutions, demonstrating mastery across intricate frontend interfaces and robust, high-performance backend architectures. His advanced skill set prominently includes the seamless integration and deployment of cutting-edge Artificial Intelligence and Machine Learning models into live production environments. This is powerfully showcased through his leadership in developing interactive, data-driven prediction platforms, such as the Heart Risk Predictor and the Skin Cancer Detector, which transform complex algorithms into actionable insights for users. Tasin's unwavering passion for driving efficiency extends across all his endeavors. Beyond client-facing projects, he conceptualizes and develops powerful internal management tools and targeted Micro-SaaS products. He consistently leverages automation and intelligent, AI-enhanced solutions to create streamlined, high-value systems that not only solve complex problems but also significantly elevate operational effectiveness and deliver tangible, measurable results.

Our Process

ML Model Pipeline Construction

ML Model Pipeline Construction

We used sklearn to build a RandomForestClassifier. A comprehensive preprocessing Pipeline was created to automatically impute missing values (using median for numeric, most-frequent for categorical) and apply StandardScaler to numeric data and OneHotEncoder to categorical data. This ensures all new data is transformed in the exact same way as the training data.

Full-Stack Django Integration

Full-Stack Django Integration

A Django web application was built to serve the trained heart_model.pkl file. This involved creating the user interface (HTML/CSS) and backend views (Python) for three key sections: the “Single Prediction” form, the “Import Data” (CSV upload) feature, and the “Graphs” display page.

Interactive Prediction & Visualization

Interactive Prediction & Visualization

Backend logic was developed to handle POST requests from both the form and the CSV upload. The app loads the model, runs predictions, and dynamically renders the results to the user—either as a single clear diagnosis on the “Single Prediction” page or as a full, downloadable table of results on the “Import Data” page.

Key Results

74.01%

Overall Test Accuracy

77.61%

Positive Case Detection (Recall)

2

Dual-Feature Web Application

Want to share something with us? We’re here to listen to you.

Tell us about your plans, challenges, or ideas — we’re here to listen, understand, and find the best solution for you. Just fill out the form — reach out and see how we can truly help you.