0% found this document useful (0 votes)
20 views23 pages

New Microsoft PowerPoint Presentation (Recovered)

Uploaded by

ishan13dwivedi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views23 pages

New Microsoft PowerPoint Presentation (Recovered)

Uploaded by

ishan13dwivedi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Dr. A. P. J.

Abdul Kalam Technical University , Lucknow

BABU BANARASI DAS NORTHERN INDIA INSTITUE OF


TECHNOLOGY

Final Year Project


Cardiovascular Disease Prediction Using Machine Learning

Department Of Information Technology


~Submitted By:
Juned Ahmad (2000560130024)
Ishan Dwivedi (2000560130022)
Abhishek Pati Tripathi (2000560130005)
Heart Attack Prediction Using Machine Learning

Abstract
Cardiovascular disease is one of the most heinous disease, especially the silent heart
attack, which attacks a person so abruptly that there's no time to get it treated and such
disease is very difficult to be diagnosed. Various medical data mining and machine
learning techniques are being implemented to extract the valuable information regarding
the heart disease prediction. Yet, the accuracy of the desired results are not satisfactory.
This Model proposes a heart attack prediction system using Machine learning techniques.
Health care field has a vast amount of data, for processing those data certain techniques
are used. Data mining is one of the techniques often used. Heart disease is the Leading
cause of death worldwide. This System predicts the arising possibilities of Heart Disease.
The datasets used are classified in terms of medical parameters. This system evaluates
those parameters using data mining classification technique. The datasets are processed
in python programming using two main Machine Learning Algorithm namely Decision
Tree Algorithm and Naive Bayes Algorithm which shows the best algorithm among these
two in terms of accuracy level of heart disease.

• IDLE used in this project is JUPYTER NOTEBOOK


• Requirements : Laptop with minimum 4 GB RAM , Anaconda , Jupyter NoteBook ,
Python 3.7
What is Machine Learning

Programming a computer, to
optimize performance Machine Learning is a branch
standards, by using of Artificial Intelligence
experience

Calculation of algorithms
allows computers to develop
behavior’s based on real data
Quick Facts About Machine Learning

Supervised Algorithm
Apply past information registered, to
new data

Machine
Learning Reinforcement Algorithm
To make a sequence of decision
Algorithm

Unsupervised Algorithm
Draw conclusion from datasets
Components of Machine Learning

Representation Evaluation Optimization

• Data Representation • Model Selection


• Model Evaluation Metrics
• Feature Engineering • Parameter Learning
• Train-Test Split
• Data Encoding • Hyperparameter Tuning
• Validation
• Text and Image • Regularization
• Hyperparameter Tuning
Representation • Ensemble Methods

 These three components of machine learning—representation, evaluation,


and optimization—are interconnected and iterative processes. Properly
representing the data, choosing suitable evaluation metrics, and optimizing
the model are key to building effective and accurate machine learning
systems.
Case Studies On Machine Learning

If remember Machine learning Netflix predicts the


frequently "likes" a algorithms have ratings an individual
friend's posts, the helped reveal will give a movie,
news feed will previously which they haven't
automatically start unrecognized even watched yet ,
showing more of influences based on previous
that friend's activity, between artists. movie ratings made
earlier in the feed. by them.
Statical Method Used To Recommend A Movie On Netflix

The best
Anybody can answers are
Anybody can
ask a voted up and
answer
question rise to the
top
Industries which will benefit because of
Machine Learning and Artificial Intelligence

Finance
• Al financial advisors will soon replace human advisors, as
computerized systems can scan tens of thousands of
enterprises to make quick recommendations.

Healthcare
• Sequencing of individual genomes and comparing them to a
large database, will allow doctors and Al bots to predict the
probability of contracting a particular disease and a remedy to
treat it, when it appears.
EVOLUTION OF AI (ARTIFICIAL INTELLIGENCE)
MACHINE
LEARNING LIFE
CYCLE
Data Model
Building
Preparation Training

Parameter Transfer Model


Selection Learning Verification

Deploy Monitoring
GET DATA:

• Kaggle : which is so organized. They give you info on the features, data
types, number records.
You can use their kernel too and you won't have to download the
dataset.
• Reddit : which is great for requesting the datasets we want.
• Google Dataset Search : which is still Beta, but it's amazing.
• UCI Machine Learning Repository :this one maintains 468 data sets as a
service to the machine learning community.
Data Cleaning And Manipulating Steps in Machine Learning

DATA CLEANING STEPS

Removing unwanted • Duplicate/ redundant or irrelevant values


observations deletion.

Missing Data handling • Fixing issue of unknown missing values

• Fixing problems with mislabeled classes, types in


Structural error solving names of features, same attribute with different
name etc.

• Unwanted values which are not


Outliers Management fiting in datasets.
Training And Testing The Model

 It’s about training


PROPOSED ALGORITHM

 Why use Decision Trees?


 There are various algorithms in Machine learning, so choosing the best
algorithm for the given dataset and problem is the main point to remember
while creating a machine learning model. Below are the two reasons for using
the Decision tree :
 Decision Trees usually mimic human thinking ability while making a decision, so
it is easy to understand. The logic behind the decision tree can be easily
understood because it shows a tree-like structure.
EXAMPLE :
Is a person fit?

Age < 30 ?

Yes? No?

( Eats a lot of pizzas ?) ( Exercises in the morning ?)

Yes? No? Yes? No?

Unfit! Fit Fit Unfit!


KNN NEIGHBOUR CLASSIFIER
The k-nearest neighbors (KNN) algorithm is a simple, easy-to-implement supervised
machine learning algorithm that can be used to solve both classification and regression
problems
 A classification problem has a discrete value as its output. For example, "likes pineapple
on pizza“.
 A regression problem has a real number (a number with a decimal point) as its output .
The KNN Algorithm
• Load the data
• Initialize K to your chosen number of neighbors3. For each example in the data
• Calculate the distance between the query example and the current example from the
data.
• Add the distance and the index of the example to an ordered collection
• Sort the ordered collection of distances and indices from smallest to largest (in
ascending order) by the distances
• Pick the first K entries from the sorted collection
• Get the labels of the selected K entries
• If regression, return the mean of the K labels
KNN ALGORITHM
 KNN tries to find similarities between predictors and values that are within the
dataset.
 KNN uses a non-parametric method as there is not a particular finding of
parameters to a particular functional form.
 It does not make any type of assumptions about the features and output of the
dataset .
 KNN is also called a lazy classifier as it memorizes the training data and not
exactly learn and fix the weights. Hence most of the computing work occurs
during the classification rather than training time .
 KNN usually works by just trying to see to which class is the new feature near to
and it just puts it to the class closest to that point.
DIGRAMATICAL EXPLAINATION OF KNN ALGORITHM
 DATA SET:
ABOUT THE DATA SET:
 Age: Age of the patient
 Sex : Sex of the patient
 ca: number of major vessels (0-3)
 cp: Chest Pain type
Value 1: typical angina
Value 2: atypical angina
Value 3: non-anginal pain
Value 4: asymptomatic
 trtbps: resting blood pressure (in mm Hg)
 Chol : cholesterol in mg/dl fetched via BMI sensor
 fbs: (fasting blood sugar > 120 mg/dl) (1 = true; 0 = false)
 Rest ecg: resting electrocardiographic results
Value 0: normal
Value 1: having ST-T wave abnormality (T wave inversions and/or ST elevation or
depression of > 0.05 mV)
Value 2: showing probable or definite left ventricular hypertrophy by Estes' criteria
 thalach: maximum heart rate achieved
 target: 0= less chance of heart attack 1= more chance of heart attack
VISUALIZING DATASET:

Heart Attack:

Share of people with heart issues across India in


2020, by age group

 Reference from : https://www.statista.com/statistics/1123509/india-share-of-


respondents-with-heart-issues-by-age-group/
Reference from : https://www.ahajournals.org/
HEART ATTACK CHANCE CORRESPONDING TO
RESTING HEART ATTACK

You might also like