{"id":25287424,"url":"https://github.com/niladrighosh03/classification---comparison-of-supervised-machine-learning-algorithms","last_synced_at":"2025-04-06T16:42:52.697Z","repository":{"id":275265294,"uuid":"925588472","full_name":"niladrighosh03/Classification---Comparison-of-Supervised-Machine-Learning-Algorithms","owner":"niladrighosh03","description":"This project explores supervised machine learning algorithms for heart disease prediction using the UCI Heart Disease Dataset. Various classification models like KNN, SVM, Logistic Regression, Decision Trees, Random Forest, Naïve Bayes, Gradient Boosting, and XGBoost are implemented and compared based on accuracy, precision, recall, and F1-score.","archived":false,"fork":false,"pushed_at":"2025-03-26T04:45:22.000Z","size":4632,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T05:28:27.379Z","etag":null,"topics":["accuracy-score","analysis","classification-algorithm","comparison","datasets","decision-trees","exploratory-data-analysis-eda","feature-engineering","heart-disease","machine-learning-algorithms","xgboost"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/niladrighosh03.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-01T08:22:47.000Z","updated_at":"2025-03-26T04:45:25.000Z","dependencies_parsed_at":"2025-02-01T09:35:06.347Z","dependency_job_id":null,"html_url":"https://github.com/niladrighosh03/Classification---Comparison-of-Supervised-Machine-Learning-Algorithms","commit_stats":null,"previous_names":["niladrighosh03/ml-classification-project","niladrighosh03/classification---comparison-of-supervised-machine-learning-algorithms"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niladrighosh03%2FClassification---Comparison-of-Supervised-Machine-Learning-Algorithms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niladrighosh03%2FClassification---Comparison-of-Supervised-Machine-Learning-Algorithms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niladrighosh03%2FClassification---Comparison-of-Supervised-Machine-Learning-Algorithms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niladrighosh03%2FClassification---Comparison-of-Supervised-Machine-Learning-Algorithms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niladrighosh03","download_url":"https://codeload.github.com/niladrighosh03/Classification---Comparison-of-Supervised-Machine-Learning-Algorithms/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247517882,"owners_count":20951713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accuracy-score","analysis","classification-algorithm","comparison","datasets","decision-trees","exploratory-data-analysis-eda","feature-engineering","heart-disease","machine-learning-algorithms","xgboost"],"created_at":"2025-02-12T22:38:57.405Z","updated_at":"2025-04-06T16:42:52.691Z","avatar_url":"https://github.com/niladrighosh03.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ❤️ Heart Disease Prediction Using Machine Learning\n\nThis project applies supervised machine learning algorithms to predict the risk of heart disease using the UCI Heart Disease dataset. The dataset consists of patient attributes and clinical measurements, which are used to classify individuals into heart disease risk categories. \n\nThe implementation includes:  \n- 🛠️ Data preprocessing  \n- 📊 Exploratory analysis  \n- 🤖 Model training and evaluation  \n- 🌐 A Streamlit-based deployment for real-time predictions.\n\n---\n\n## 📜 Table of Contents\n\n1. [📋 Overview](#overview)  \n2. [📈 Dataset](#dataset)  \n3. [🛠️ Preprocessing](#preprocessing)  \n4. [🤖 Algorithms](#algorithms)  \n5. [🌐 User Interface (UI)](#user-interface-ui)  \n6. [🔮 Future Work](#future-work)  \n7. [🙌 Acknowledgments](#acknowledgments)  \n\n---\n\n## 📋 Overview\n\nHeart disease remains a leading cause of mortality worldwide. Accurate prediction models can assist in early detection and prevention. This project evaluates multiple machine learning algorithms and identifies the best-performing model to classify heart disease risk. Results show that ensemble methods like XGBoost and Gradient Boosting outperform others in accuracy and reliability.\n\n---\n\n## 📈 Dataset\n\n### Source  \n[UCI Machine Learning Repository - Heart Disease Dataset](https://archive.ics.uci.edu/ml/datasets/Heart+Disease)\n\n### Features  \n- **Demographics**: Age, Sex  \n- **Clinical Measurements**: Resting blood pressure, serum cholesterol, maximum heart rate, etc.  \n- **Categorical Attributes**: Chest pain type, thalassemia, slope of the ST segment  \n\n### Target Variable  \nThe presence of heart disease, categorized into five classes (0–4).\n\n---\n\n## 🛠️ Preprocessing\n\nThe dataset underwent extensive preprocessing:  \n- ✨ **Handling Missing Values**: Imputation with mode (categorical) and mean (numerical) values.  \n- 📉 **Outlier Detection**: Addressed using interquartile range (IQR).  \n- 🧩 **Feature Engineering**: Added derived features like `BP-to-Cholesterol Ratio`.  \n- 📏 **Scaling and Encoding**: Applied `StandardScaler` and one-hot encoding for categorical variables.\n\n---\n\n## 🤖 Algorithms\n\nThe following machine learning models were evaluated:  \n- **Baseline Models**: K-Nearest Neighbors (KNN), Support Vector Machines (SVM), Logistic Regression  \n- **Tree-Based Models**: Decision Tree, Random Forest  \n- **Ensemble Models**: Gradient Boosting, XGBoost  \n- **Bayesian Models**: Gaussian Naive Bayes  \n\nEvaluation metrics include accuracy, precision, recall, F1-score, and Root Mean Squared Error (RMSE).  \n\n---\n\n## 🌐 User Interface (UI)\n\nA **Streamlit-based web application** has been developed to provide an interactive UI for heart disease prediction.\n\n### Steps to Run the Application\n1. 🔗 Clone the repository:  \n   ```bash\n   git clone github.com/niladrighosh03/Classification---Comparison-of-Supervised-Machine-Learning-Algorithms\n   cd Classification---Comparison-of-Supervised-Machine-Learning-Algorithms\n   ```\n2. 📦 Install dependencies:  \n   ```bash\n   pip install -r requirements.txt\n   ```\n3. 🚀 Run the Streamlit app:  \n   ```bash\n   cd Measurements\n   streamlit run app.py\n   ```\n4. 🌍 Open the displayed **local URL** in your browser to access the UI.\n\n---\n\n## 🔮 Future Work\n\n- 🌟 **Data Augmentation**: Address dataset imbalance for underrepresented classes.  \n- 🛠️ **Hyperparameter Optimization**: Use grid search for fine-tuning models.  \n- 🧠 **Explainability**: Integrate SHAP for model interpretability.  \n- 📅 **Temporal Data Integration**: Include time-series data for dynamic risk prediction.  \n\n---\n\n## 🙌 Acknowledgments\n\nSpecial thanks to:  \n- 🏫 **Ramakrishna Mission Vivekananda Educational and Research Institute (RKMVERI)** for resources.  \n- 👨‍🏫 **Br. Tamal Mj**, for guidance and support throughout the project.  \n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniladrighosh03%2Fclassification---comparison-of-supervised-machine-learning-algorithms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniladrighosh03%2Fclassification---comparison-of-supervised-machine-learning-algorithms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniladrighosh03%2Fclassification---comparison-of-supervised-machine-learning-algorithms/lists"}