Heart Disease Prediction System Using S.V.M
Heart Disease Prediction: A web app using SVM to assess heart disease risk. FastAPI backend, Bootstrap UI, MongoDB for history tracking. Predict, store, and analyze with ease.
Created on 22nd March 2025
•
Heart Disease Prediction System Using S.V.M
Heart Disease Prediction: A web app using SVM to assess heart disease risk. FastAPI backend, Bootstrap UI, MongoDB for history tracking. Predict, store, and analyze with ease.
The problem Heart Disease Prediction System Using S.V.M solves
-
Early Disease Detection: The system uses Support Vector Machine (SVM) to analyze patient data and provide early heart disease risk predictions, enabling timely medical intervention.
-
Improved Diagnosis Accuracy: Traditional diagnosis methods can be time-consuming and error-prone. Our AI-powered system enhances accuracy by analyzing multiple health parameters efficiently.
-
Secure Medical Record Storage: By integrating Aptos Blockchain, the system ensures tamper-proof and immutable storage of medical records, reducing the risk of fraud and data manipulation.
-
Privacy-Preserving Data Management: With AES encryption and Web3 authentication, patient data remains secure and accessible only to authorized users, protecting sensitive health information.
-
Automated Risk Alerts: The platform automatically notifies doctors and patients when a high-risk prediction is detected, facilitating prompt medical action and reducing response time.
-
Decentralized & Trustless Healthcare System: By leveraging Reactive Smart Contracts (RSCs), the system removes reliance on centralized healthcare providers, ensuring data integrity and transparency.
-
Faster Access to Patient History: Doctors can instantly access previous diagnoses and risk assessments stored on the blockchain, reducing redundant tests and improving patient care.
-
Scalable & Cost-Effective Healthcare Solution: The system reduces hospital workload by automating risk analysis, making AI-driven healthcare accessible in remote areas.
-
Fraud Prevention & Data Integrity: Blockchain integration prevents unauthorized modifications to health records, ensuring reliable and verifiable medical data for all stakeholders.
-
Cloud-Based, Multi-Device Access: Patients and doctors can securely access reports from anywhere through a cloud-based dashboard, making healthcare more efficient and patient-centric.
Challenges we ran into
-
Model Accuracy Optimization: Initially, XGBoost and KNN models showed lower accuracy, leading us to switch to SVM, which provided better predictive performance after hyperparameter tuning.
-
Backend and Database Latency: Integrating FastAPI with MongoDB Atlas caused high query response times. We optimized database queries, added indexing, and used asynchronous API calls to improve performance.
-
Smart Contract Execution Failures: Deploying Reactive Smart Contracts (RSCs) resulted in transaction failures due to incorrect gas estimations. We adjusted the contract logic and used Web3.js event listeners to resolve the issue.
-
Securing API Authentication: Implementing secure authentication was challenging. We integrated JWT-based authentication and AES encryption to ensure safe and authorized data access.
-
Real-Time Data Flow Issues: Handling real-time heart disease predictions in the React-based UI caused state management errors. We optimized the data flow and used Redux for smoother updates.
-
Model Deployment Challenges: Deploying the SVM model on cloud servers led to performance bottlenecks. Using model serialization (Joblib) and cloud inference APIs, we improved scalability and response speed.
-
Blockchain Storage Limitations: Storing entire health records on-chain was expensive. Instead, we stored hashed metadata on Aptos blockchain, keeping detailed records in MongoDB Atlas for efficient access.
-
Handling Incomplete Data: Missing values in patient records affected model accuracy. We implemented data imputation techniques to fill gaps and maintain dataset reliability.
-
Docker Deployment Issues: Dockerizing the project caused environment conflicts. We optimized the Docker setup, resolved dependency issues, and ensured a smooth cloud deployment.
-
Performance and Scalability: High API request loads slowed the system. We implemented request throttling, database indexing, and caching mechanisms to stabilize the platform under heavy traffic.