Advanced Machine Learning Cardiology Predictor with an Ultra-Premium Glassmorphism Interface
HeartIQ Engine is an end-to-end intelligent predictive diagnostic system. It leverages algorithmic hyperparameter optimization across multiple machine learning models (Random Forest, Gradient Boosting, SVM, Logistic Regression) to assess the risk of cardiovascular presence based on standard clinical metrics. It automatically selects the optimal champion model, achieving ~90%+ prediction accuracy.
The predictor interfaces with users through a custom-built, ultra-premium web UI engineered with deep glassmorphism, dynamic CSS3 animations, and a seamless backend integration via a RESTful Flask server.
- 🏆 Auto-Optimized ML Pipeline: Utilizes
GridSearchCVon scaled medical data to simultaneously test Logistic Regression, SVC, Random Forest, and Gradient Boosting before automatically saving the best performer. - ⚡ Flask REST API Engine: A lightweight, non-blocking Python backend ready to receive
JSONrequests and compute complex biometrics in milliseconds. - 💎 Ultra-Premium UI:
- Dynamic ambient mesh backgrounds and floating organic blobs.
- Inter & Outfit typography for modern readability.
- Beautiful neon interactive inputs with animated focal-glow transitions.
- Interactive prediction cards with an animated "Confidence Score" indicator.
- Machine Learning:
scikit-learn,pandas,numpy,joblib - Backend API:
Python,Flask,Flask-CORS - Frontend & UI Elements:
HTML5, VanillaCSS3,JavaScript (ES6+),FontAwesome v6
Ensure you have Python 3.8+ installed. Navigate into your project directory using a terminal (e.g., PowerShell or terminal of your choice).
Install all required Python packages using pip:
pip install -r requirements.txtTrain the predictive models and let the system find the best configuration automatically. This will generate the heart_disease_model.pkl and scaler.pkl files natively.
python train_model.pyExpected Output: Logs tracking training evaluation logic for each algorithm, terminating with the Best Model Selection parameters.
Start the development server bridging the predictive model and the frontend GUI:
python server.pyNavigate to the hosted URL on your local browser:
http://127.0.0.1:5000
The dataset utilized is standard formatted medical cardiology parameters. Models evaluate metrics strictly across the following 13 biological indicators:
- Demographics:
Age,Sex - Vitals:
Resting BP,Max Heart Rate,Serum Cholesterol - Medical Tests:
Chest Pain Type,Fasting Blood Sugar,Resting ECG,Exercise Angina,ST Depression (Oldpeak),Slope of ST,Fluoroscopy Vessels,Thallium Scan Results
- Client interacts with our premium
glass-paneledGUI. - Form submission generates an asynchronous
POST JSONrequest to the Flask server viafetch()API. - The Flask router decodes parameters, invokes the
joblibmemory loadedStandardScalerto align data scales with the trained snapshot. - Scale integers are fed into the highest-accuracy predictor model.
- Probabilities and logical classifications traverse back to the client.
- The
overlay UItriggers an engaging diagnostic report card.