Skip to content

Latest commit

 

History

History
45 lines (23 loc) · 1.75 KB

File metadata and controls

45 lines (23 loc) · 1.75 KB

❤️ Heart Disease Prediction using Machine Learning with Python 🐍

Description:

This project aims to provide a simple and effective way to predict heart disease based on a variety of health indicators. It includes data loading, preprocessing, model training, evaluation, and prediction functionalities. The goal is to demonstrate a basic machine learning approach to heart disease prediction. 🩺

Features:

  • Data Loading: Loads heart disease data from a CSV file. 📂

  • Data Exploration: Displays the first and last few rows, shape, information, statistical description, and target variable distribution of the dataset. 🔍

  • Data Preprocessing: Splits the data into features (X) and target (Y). 🧹

  • Train-Test Split: Divides the data into training and testing sets for model evaluation. ➗

  • Model Training: Trains a Logistic Regression model using the training data. 🤖

  • Model Evaluation: Evaluates the model's performance on both training and testing data using accuracy scores. 📈

  • Prediction System: Creates a simple predictive system that takes input data and predicts the likelihood of heart disease. 🔮

Technologies Used:

  • Python 🐍

  • Pandas 🐼

  • NumPy 🔢

  • Scikit-learn 🔬

Getting Started:

  1. Clone the repository: git clone <repo url>

  2. Ensure you have the heart.csv dataset in the same directory as your script.

  3. Install the necessary libraries: pip install pandas numpy scikit-learn

  4. Run the Python script.

Example Usage:

The script will load the data, train the model, evaluate its performance, and then make a prediction based on sample input data. It will print the accuracy on the training and test data, as well as the prediction result (healthy or heart disease).