GitHunt
JO

joshi-jyoti/Heart-Disease-Prediction

This repository contains a Python-based project for predicting the likelihood of heart disease using a Logistic Regression machine learning model. It leverages a dataset of patient medical information to train and evaluate the model, providing insights into potential diagnoses.๐Ÿฉบ

โค๏ธ 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).

Languages

Python100.0%

Contributors

Created February 3, 2025
Updated February 4, 2025
joshi-jyoti/Heart-Disease-Prediction | GitHunt