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:
-
Clone the repository:
git clone <repo url>
-
Ensure you have the
heart.csv
dataset in the same directory as your script. -
Install the necessary libraries:
pip install pandas numpy scikit-learn
-
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).