Short on time?

Get essay writing help

Heart Attack Prediction Using Machine Learning

  • Words: 1037
  • |
  • Pages: 2
  • This essay sample was donated by a student to help the academic community. Papers provided by EduBirdie writers usually outdo students' samples.


The heart disease diagnosis mostly depends on a combination of clinical data.And this is a reason for the interest of researchers to make the result more accurate each time they work.

Cardiovascular sickness is one of the main reasons for heart diseases and study of such sickness can help in predicting such diseases. Everyone in the hospital is not equally skilled as a specialist but specialists also can make mistakes so to save time and get more accurate results we are going to develop a system which can assist medical professionals to predict heart diseases. The input will be the data related to patient i.e age,sex,fasting bloodsugar,resting ECG,max heart rate,chest pain type,number of vesssel colored.The accuracy of prediction is around 87%.our system will be effective in predicting the heart disease and will contribute in the welfare for sociecty.


Among different different diseases ,heart disease has a very big issue.The department of heart disease now is facing a very big issue of heart attack.The department of heart disease is based on signs and symptoms and physical examination of the patient. There many types of element involve for the heart disease such as smoking , family history of heart , cholesterol obesity ,high blood pressure , and lack of excerise.Now days major challenges faced by health department like heart stroke.Machine learning is used across all over world for the accuracy of the data.In this project ,I’ll discuss a project where I worked on predicting heart stroke using Machine Learning algorithms.The Algorithms included (K Neighbors Classifier).The Data set has been taken from Kaggle platform.I imported several libraries for the dataset and Machine learning.As we know that our heart is very important for our body.Our heart pumps blood to every part of our body for our organs.According to WHO(World Health Organisation) heart related diseases are responsible for the big cause of death of human.Heart disease killed many numbers of Indian every year.Medical department all around the world , collect data on different – different health related problems.These dataset can be exploited using various machine learning technique to gain useful result.Using Machine learning technique we can reduce the problem of heart disease.Algorithm of Machine Learning provide us several kinds of knowledge related to our dataset , so we can easily predict the occurrence of heart attack disease problem.[8]

Existing system

Existing system is based on several kinds of algorithms such as Support vector classifier , Decision Tree classifier and Random Forest Classifier.These algorithms are not very good like a K Neighbors algorithm , So I used the K Neighbors algorithm in my project.

Proposed Model

In this project we are using a heart attack prediction system using the K Neighbors Classifier algorithm.We will give the input as a csv data set to the system. After taking the input I will apply Machine Learning Algorithms . After uploading the data set the machine learning techniques are performed and an effective heart attack result is produced.

Save your time!
We can take care of your essay
  • Proper editing and formatting
  • Free revision, title page, and bibliography
  • Flexible prices and money-back guarantee
Place Order

Literature Review

There are so many works that have been done related to heart disease prediction using various techniques in the field of medical science . The above work done by training various data sets consist of more than 3000 instances and 13 different types of attributes . the data sets is divided into two parts in first part 70% of data are used for training the data set and rest 30 are used for testing A H Chen ; S Y Huang ; P S Hong ; C H Cheng ; E J Lin developed a system in which in which 13 important clinical data is used i.e age, sex, cholosterol ,fasting blood sugar, resting ECG, old peak,max heartrate etc.. and he mentioned in his abstract that his accuracy is 80%.our project mainly works on given three algorithm.1.K NEIGHBORS CLASSIFIER 2.SUPPORT VECTOR CLASSIFIER 3.DECISION TREE CLASSIFIRE. The above algorithm improves the efficiency and the result is quite satisfactory.Ashok Kumar Dwivedi suggested different types of algorithms like naive bayes ,KNN, to improve accuracy compared to other algorithms.[1]


Instant doctor help can increase life expectancy , prediction will be faster and more accurate , the number of predictions can be done in a day compared to manually will be more.

It will be user friendly, cost effective and have a high rate of success, easy to install software to the system.


Detection of disease at an early age is not possible, it will not predict in absence of any data set that is required for prediction, generate categorical data i.e in the form of multidimensional matrix.

Machine Learning

In my project I have used 3 algorithms for machine learning.1.K NEIGHBORS CLASSIFIER 2.SUPPORT VECTOR CLASSIFIER 3.DECISION TREE CLASSIFIER. Now I’ll import tranin_test_split to split our dataset into training and testing dataset.After that I will import several kinds of Machine Learning models

  • K Neighbors Classifier : Now I am going to plot a score graph for different values of K(Neighbors).Whatever neighbors values we will choose accordingly the classification score varies.In the given Graph it is clear that the maximum score achieved was 0.87 for the 8th neighbors.
  • Support Vector Classifier : My aim is to check which Kernel is giving the best score.I have plotted a bar of scores for each kernel and see it is providing the best performance.
  • Random Forest Classifier : In this part I have plotted a graph between Scores and Number of estimators using ensemble method.[2]


In this project I have used a Machine learning algorithm to predict the Heart Attack Diseases.With the help of Machine learning we can easily handle huge amounts of clinical data for best prediction.In the end K Neighbour algorithm is providing the more accurate prediction of the heart diseases.So we can say that with help of several kinds of Machine Algorithm we can easily predict many kinds of related information.


  1. (Literature Review)
  2. (Machine learning technique)
  4. Purushottam, K.Saxena and R. Sharma, “Efficient Heart Disease Prediction System,” Proceed. Comput. Sci., ELSEVIER, Vol. 85, pp. 962 – 969, 2016.
  5. Sheena Angra, Sachin Ahuja, “Machine Learning and its Applications: A Review”, IEEE, International Conference On Big Data Analytics and computational Intelligence, pp. 57-60, 2017.
  6. Mac Dougall Candice, Percival Jennifer and Mc Gregor Carolyu, “Integrating Health Information Technology into Clinical Guidelines”, Annual International Conference of the IEEE, EMBS Minneapolis, Minnesota, USA, September 2-6, 2009.
  7. (Used for Dataset)

Make sure you submit a unique essay

Our writers will provide you with an essay sample written from scratch: any topic, any deadline, any instructions.

Cite this Page

Heart Attack Prediction Using Machine Learning. (2022, February 17). Edubirdie. Retrieved December 2, 2022, from
“Heart Attack Prediction Using Machine Learning.” Edubirdie, 17 Feb. 2022,
Heart Attack Prediction Using Machine Learning. [online]. Available at: <> [Accessed 2 Dec. 2022].
Heart Attack Prediction Using Machine Learning [Internet]. Edubirdie. 2022 Feb 17 [cited 2022 Dec 2]. Available from:
Join 100k satisfied students
  • Get original paper written according to your instructions
  • Save time for what matters most
hire writer

Fair Use Policy

EduBirdie considers academic integrity to be the essential part of the learning process and does not support any violation of the academic standards. Should you have any questions regarding our Fair Use Policy or become aware of any violations, please do not hesitate to contact us via

Check it out!
search Stuck on your essay?

We are here 24/7 to write your paper in as fast as 3 hours.