ML Report
ML Report
This is to declare that this report has been written by me. No part of the report
is copied from other sources. All information included from other sources have
been duly acknowledged. I aware that if any part of the report is found to be
copied, I will take full responsibility for it.
2 OBEJCTIVE 4
3 HISTORY 4
5 WORKING 6-7
6 CONCLUSION 8-12
Objective-
History-
Introduction:
The Heart Disease Prediction project is a machine learning-based solution
designed to predict the likelihood of an individual having heart disease based
on various medical and demographic features. This project utilizes logistic
regression, a popular classification algorithm, to make predictions.
Dataset:
The project employs a comprehensive dataset containing 303 instances with 14
different attributes. These attributes include:
• Age
• Sex
• Chest pain type (cp)
• Resting blood pressure (trestbps)
• Serum cholesterol level (chol)
• Fasting blood sugar (fbs)
• Resting electrocardiographic results (restecg)
• Maximum heart rate achieved (thalach)
• Exercise-induced angina (exang)
• ST depression induced by exercise relative to rest (oldpeak)
• Slope of the peak exercise ST segment (slope)
• Number of major vessels colored by fluoroscopy (ca)
• Thalassemia (thal)
The dataset is labelled, with the 'target' attribute denoting the presence
(1) or absence (0) of heart disease.
Libraries Used:
The project leverages various Python libraries to process and analyse the
data, train the logistic regression model, and evaluate its performance.
These libraries include:
Project Workflow:
Data Preparation: The project starts with loading the dataset using
Pandas. Initial data exploration is conducted, including checking for null
values and understanding the structure of the dataset.
Data Splitting: The dataset is divided into training and testing sets using
“scikit-learn's train_test_split” function. This ensures that the model is
trained on one portion of the data and evaluated on another to assess its
generalization performance.
STEP2: OPENING THE CSV DATA FILE USING PANDAS METHO . READ
STEP 3: FETCHING THE INFORMATION ABOUT THE SHAPE AND DETAILS OF DATA
STEP 4: CHECKING IF THE DATA NEEDS CLEANING AND THEN DESCRIBING DATA.
STEP 5- CHECKING IF THE DATA IS DISTRIBUTED PROPERLY OR NOT.
target
1 165
0 138
Name: count, dtype: int64
CONCLUSION: - The Heart Disease Prediction project effectively demonstrates the use of
logistic regression for classifying individuals into two categories: those with and without
heart disease. It showcases the project workflow, data preparation, model training, and a
user-friendly predictive system. Additionally, the visual representation of the decision
boundary helps users understand how the model makes predictions based on selected
features.
This project can serve as a foundation for further enhancements and can be extended to
include additional features, explore different machine learning algorithms, or implement a
more comprehensive user interface for broader applications in the field of medical
diagnosis.