Skip to content

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.๐Ÿฉบ

Notifications You must be signed in to change notification settings

joshi-jyoti/Heart-Disease-Prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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

About

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.๐Ÿฉบ

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages