Heart Attack Prediction System Using IoT and Machine Learning
Heart Attack Prediction System Using IoT and Machine Learning
https://doi.org/10.22214/ijraset.2022.42749
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue V May 2022- Available at www.ijraset.com
Abstract: Nowadays, health diseases are increasing day by day due to lifestyle, hereditary. Especially heart attack has become
more common lately, i.e., the life of people is at risk. Each individual has different values for vital sign, cholesterol, and pulse.
But consistent with medically proven results the traditional values of vital sign are 120/90, Cholesterol is 100- 129 mg/dL, pulse
is 72, Fasting blood glucose level is 100 mg/dL, Heart rate is 60-100bpm, ECG is normal, Width of major vessels is 25 mm (1
inch) in the aorta to only 8 m in the capillaries.
This paper analyses various classification systems for determining a person's risk level based on age, gender, blood
pressure, cholesterol, and pulse rate. A predictive modelling-based "Ailment Prediction" system predicts the user's
disease based on the symptoms provided as input to the system. The system takes the input from user and analyses the
symptoms and gives the output as a probability of the disease. Five approaches are used to predict disease: Naive Bayes,
KNN, Decision Tree, Linear Regression, and Random Forest Algorithms. These methods are used to evaluate the
disease's probability. Therefore, the average prediction accuracy probability of 83 % is obtained.
Keywords: Heart rate sensor Pulse, Android smartphone, Pulse Sensors, ECG sensor, Internet of Things.
I. INTRODUCTION
The World Health Organization's estimate provided the impetus for this project. According to the World Health
Organization, roughly 23.6 million people will die from heart disease between now and 2030. To reduce the risk, the
expectation of coronary sickness should be eliminated. Analysis of coronary illness is typically given signs, manifestations ,
and physical examination of a patient. The Most troublesome and complex assignment in the medicinal services area is
finding the right ailment. This colossal entirety of rough data is the rule resource that can be capably pre-taken and inspected
for key information extraction that directly or by suggestion influences the remedial society for cost sufficiency and
reinforces deciding Simple human understanding cannot be used to provide an accurate diagnosis of coronary artery disease.
A variety of factors can influence the accuracy of a conclusion, including less precise results, lack of experience, time-
subordinate execution, data to a degree, and so on. In this sector, numerous advancements and examinations were made
using multi-parametric characteristics with nonlinear and direct components of Heart Rate Variability (HRV). Various
experts have utilised various classifiers to achieve this, e.g. CMAR (Classification Multiple Association Rules), SVM
(Support Vector Machine), Bayesian Classifiers, and C4.5).The latest rate techniques in this field depicted in Some plausible
strategies and techniques we recommended incorporates the clinical information institutionalization, examination, and the
information sharing over the related industries to improve the precision viability of information mining applications in social
insurance. It is likewise prudent to investigate the utilization of content digging and picture digging for extension the nature
and extent of information mining applications in the medicinal services part. The viability of an information mining
application can also be assessed using computerised suggestive images. In these areas, some progress has been made.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2043
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue V May 2022- Available at www.ijraset.com
The given methodology is additionally critical in healthcare organizations with experts that haven't any more knowledge and
skill. They focuses on techniques which will predict chronic disease by processing the info containing in historical health
records using Naive Bayes, Decision tree, Support Vector Machine and Artificial Neural Network. A comparative study is
performed on classifiers to live the higher performance at an accurate rate. From this experiment, SVM gives the very
best accuracy rate, whereas for diabetes Naive Bayes gives the very best accuracy. It uses different medical
attributes like blood glucose and pulse, age, sex is a number of the attributes are included to spot if the person has heart
disease or not. By testing and training phase a particular parameter, this paper shows86.3% accuracy in testing phase and
87.3% in training phase.
This paper mainly the values manually on the appliance interface. If any fatal situation is detected by the appliance, the
patient can communicate with any doctor via video call and any registered doctor associated with heart condition can be
found by putting his telephone number within the search bar. Concentrates on predicting the guts disease. Cloud and that
i OT Software focused on m-healthcare are developed and revised to spot truth seriousness degree and to diagnose
it consistent with gravity. The IOT equipment is understood as embedded and wearable IOT tools. These instruments
are wont to obtain information from remote areas surrounding the procedure. it's possible to collect the immediate
measurement as restorative information gathered by IOT apps, connected to the physical body. Similar medicinal
information is made by the utilization of the UCI Repository data-set and therefore the therapeutic sensors to anticipate the
overall population that was extremely impaired by diabetes. The resultant knowledge are often securely processed by
implementing five different steps of a previously introduced management
process, like information collection, information retrieval, information science, separation of data, and knowledge blending.
Cloud storage may be a process that grants structured access to the design of administrators for the asking. It processes
operates beyond the capacity of everyone to see and is employed to get data from the smart devices, to seem at and analyses
these details, and to form the buyer online insights. it's also a captivating aspect for solutions because that might build a
sector of many incentives to supply a lift to IOT software customers. Huge data analysis and machine learning predictions
can conventionally conduct the testing of this data within the cloud. Machine learning may be a quite man-made reasoning
and empowers these computations to raised themselves by collecting data from them.
A Wireless Sensor Network (WSN) may be a self-decision sensor device that transmits its data through the frame to a
central zone. An IOT system that needs a WSN to collect data for a spread of applications, thus far few out of any specific
IOT application will use it so separate, distinctive results are likely. Data aggregation is simply the essential step of an IOT
process, and this data has to be collected and converted into noteworthy information or provided to specific objects. The
devices that the WSN uses are likely to form any protest impossible, and therefore the tremendous progress of those devices
is undoubtedly the most development that began the IOT movement. Another IOT-related thinking is learning; a condition
where boundaries are established and treated and may function for people. this idea is not necessarily the inverse of IOT
because it just supports certain predefined functionality during a specific environment (e.g., space, a building), is
concentrated on human interaction, and therefore the items used might not usually be interrelated .This is not necessarily the
inverse of IOT despite how a foundation component of IOT limits human knowledge. Machine-to-machine (M2M) Mapping
is an enhanced version of IOT. M2M'semphasis is on associating gadgets and offers the prospect to urge details from certain
gadgets remotely. this data is ready to realize productivity benefits, decrease expenditures, and improve well-being or
stability in an administration application The knowledge isn't organized into various processes, it's all occurring at the
system level that you simply don't even get to connect with a cloud point. it's slowly and instantaneous, a one-
way quite correspondence.
Data in IOT implementations originates in various forms from heterogeneous demonstrations, and is then implemented
without human intercession; this is widespread in M2M implementations. IOT may help distinct M2M administrations yet
has substantially more capabilities because knowledge in IOT applications could also be used for varied purposes thanks
to technological developments. The analysis showed that the usage of Electronic Health Records (EHRs)may be improved
with the help of data Technology. As the study shows, the usage of EHRs is a smaller amount likely to be unsuccessful due
to the multifaceted complexity correlated with it. Kopper suggested an easy and technically employable solution to EHR
(EEHR) [10] and called it Weber. This approach facilitates the electronic delivery of varied human resources, thereby
enhancing data storage and sharing among the various health centres. The elderly patients monitoring from indoor or
outdoor locations had been presented by a real-time mobile healthcare system. a sign sensor and a smartphone were the
first components of the system.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2044
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue V May 2022- Available at www.ijraset.com
The bio- signal sensor data was transmitted to an intelligent server via GPRS/UMTS network for data collection. The system
could perform in monitoring the mobility, vital signs, location, and condition of the elderly patient from a foreign location.
A fully functional wireless body area network (WBAN) system had been proposed. The designed system used medical
bands to get physiological data from sensors. The author had chosen some medical bands to abate the interruption between
the sensors and other existing devices. to extend the operating extent, the multi-hopping technique had been implemented
and a medical gateway wireless board had been utilized in this regard.
Your heart may be a pump. it is a muscular organ about the dimensions of your first, situated slightly left of centre in your
chest. Your heart is split into the proper and therefore the left side. The division keeps oxygen-rich blood separate from
oxygen-depleted blood. After passing through your body, oxygen-depleted blood returns to your heart. The appropriate
atrium and ventricle on the right side of the intestines gather and pump blood to the lungs via the pulmonary arteries. The
lungs provide a replacement supply of oxygen to the blood. CO2, a waste product, is also exhaled by the lungs. The oxygen-
rich blood then enters the left side of the heart, comprising the left atrium of the heart and ventricle. The left side of the
heart pumps blood through the aorta to give oxygen and nutrients to tissues throughout the body.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2045
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue V May 2022- Available at www.ijraset.com
In a healthy person with a traditional, healthy heart, it's unlikely for a fatal arrhythmia to develop without some outside
trigger, like an electrical shock or the utilization of illegal drugs.
This is due to the fact that a healthy person's heart is free of any aberrant diseases that can induce an arrhythmia, such as
scarred tissue. In this paper, they describe that the choice taken by experts and practitioners from many various branches of
action must be rapid, accurate, and with the possible lowest level problems caused by these decisions.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2046
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue V May 2022- Available at www.ijraset.com
D. Functional Requirements
Software requirement specification document was prepared for capturing the wants during future driven development. ER
Diagram and requirement specification document was designed. For the completion of the activity a website object model
was prepared along with overall application architecture.
1) The system provides login for admin.
2) The system should allow administrators to monitor and take away inappropriate data-sets and code.
3) The system allows users to make an account and login.
4) The system allows the users to predict heart disease.
5) The system allows the user to update their profile and password
2) Hardware Interface
The minimum configuration required on the developer platform. Operating System: Android 4.2, Android 4.4.2, or Android
4.4.4· Processor:3 1 gigahertz (GHz) or faster processor or SoC. ·RAM: 1 gigabyte (GB) for 32-bit or 2 GB for 64-bit. ·
Storage: Between 850 MB and 1.2 GB, depending on the language version Pulse sensor.
3) Software Requirements
a) IDE: Jupyter notebooks
b) Platform: Windows 10 (for development), Android 7.0 or above (for deployment), Arduinsuite
c) Language: Python
d) Database: MySQL/SQLite
F. Non-Functional Requirements:
1) Performance Requirement
a) Fast Data Operation
b) Accuracy
c) Efficiency
2) Security Requirements
a) Data encryption
b) Data Privacy
G. Analysis Models
1) SDLC Model to be Applied Iterative SDLC Model: The development process may start with the wants for the functional
part, which may be expanded later. The process is repetitive, allowing to form new versions of the product for
each cycle Every iteration entails the construction of a separate system component, which is then added to the functional
that was produced previously. the main steps of the SDLC model are given below:
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2047
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue V May 2022- Available at www.ijraset.com
All the functional and non-functional requirements of the project were identified. Interaction with the users and every one
other stakeholders of the project was conducted to identify all the wants ranging from important features like maintaining an
audit trail, security parameters etc. to the very basic features just like the look and the feel of the interface. the
various requirements mainly fall under categories:
a) Design: The primary step was the database design. A complete database was required for the implementation of this
project design. The second step was the project design. The project was designed supported a framework. The
framework uses three layers: a. Business entities layer: It identifies all the entities utilized in the project.
b) Business Logic layer: This layer operates on the business entity to achieve the goals.
c) Data Access Layer: This layer is an interface between back-ended the services.
d) Construction: All modules and interface were inbuilt this step. Development was done using Python and Flutter. The
database is going to be constructed in MySQL.
e) Integration and System Testing: All the modules were integrated together. The interface was integrated with the
modules which made the use of web services. Data flow originated from the database built-in MySQL. The testing phase
project was tested and debugged. Various test cases were developed and therefore the project was tested at the developer
send also as users end. Debugging was done to get errors and exceptions which were corrected.
V. SYSTEM DESIGN
A. System Architecture
The proposed architecture of the system primarily comprises of three main components:
1) User -for Interacting with the device
2) IOT-for data collections and mobile for showing analysis
3) Sensors for collecting data
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2048
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue V May 2022- Available at www.ijraset.com
We used the output of the embedded sensors to conduct an extensive set of experiments for evaluating and distinguishing
between normal and aberrant pulse patterns in order to integrate the sensors The subjects wear the integrated sensors and
keep their smartphones in their pockets or hands. While the topic leads a normal life, the integrated ECG and temperature
sensors continuously collect heart information The smartphone will evaluate the data after receiving it over a low-power
Bluetooth connection channel to determine whether the user's state is normal or abnormal. The Android platform performs a
quantitative pulse analysis, giving the user the option of viewing real-time charts of the ECG signal and body temperature.
B. Limitations
We always need to stay connected with these sensors and micro-controllers. This only predicts and depends on heart-related
problems but in health care, various parameters should be taken into consideration.
C. Applications
This product we will use anywhere if an individual if unable to understand there-heart attack symptoms then this
device will help to research that thing and their life will get saved.
VII. CONCLUSION
Developed a system that measures and detects the patient's human heartbeat and body temperature, then communicates the
data to the user or server end via a microcontroller at a low cost. Use two different sensors and these are mainly under the
control of micro-controllers. For Human Heartbeat measurement use fingertip, it's in bpm (beats per minute). These
calculated rates are going to be stored within the server by transferring through the Wi-Fi module via the web. a liquid
display (LCD) has been used to display the calculated human heartbeat rate.
REFERENCES
[1] Khambete, N. D, and A. Murray, “National efforts to improve healthcare technology management and medical device safety in India,” Appropriate Healthcare
Technologies for Developing Countries, 7th International Conference on, IET, pp. 1–5, 2017.
[2] P.M. Kumar, S. Lokesh, R. Varatharajan, C. Gokulnath, P. Parthasarathy,” Cloud and IoT based disease prediction and diagnosis system for healthcare using
Fuzzy neural classifier”, Future Generation Computer Systems, 2018 PriyanMalarvizhi Kumar and Usha Devi Gandhi,” A novel three-tier internet of things
architecture with machine learning algorithm for early detection of heart diseases”, J. Computers and Electrical Engineering, pp. 222-235, 2018.
[3] Weng, S.F., Reps, J., Kai, J., Garibaldi, J.M. and Qureshi, N. (2017) Can Machine
[4] Hazra, A, Mandal,S., Gupta, A. and Mukherjee, A. [2017] Heart Disease Diagnosis and Prediction Using Machine Learning and Data Mining Techniques : A
Review.
[5] Advances in Computational Sciences and Technology , 10, 2137-2159.
[6] Trevor. (2018). Enterprise Personal Analytics: A Research Agenda. 10.13025/S88H04
[7] Minerva, R., Biru, A., &Rotondi, D. (2015),” IEEE- Towards a Definition of the Internet of Things (IoT)”
[8] Bilal Afzal, Muhammad Umair, GhalibAsadullah Shah, Ejaz Ahmed, “Enabling IoT platforms for social IoT applications: Vision, feature mapping, and
challenges”, Future Generation Computer Systems, 2017
[9] Luminoso, L. (2017). Creative engineering. Design Engineering (Canada), 63(1), 30-31.
[10] Jha, R. K., Henge, S. K., & Sharma, A. (2020). Optimal machine learning classifiers for prediction of heart disease. International Journal of Control and
Automation, 13(1 Special Issue), 31-37.
©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 2049