Professional Documents
Culture Documents
Submitted By:
By:
I
DECLARATION
We hereby declare that this project report is based on our original work except for citations and
quotations which have been duly acknowledged. We also declare that it has not been previously
and concurrently submitted for any other degree or award at Khwaja Fareed University of
Engineering & Information Technology or other institutions.
II
APPROVAL FOR SUBMISSION
We certify that this project report entitled “Heart Disease Prediction System” was prepared by
Muhammad Shoaib and Hamza Akram has met the required standard for submission in partial
fulfilment of the requirements for the award of Bachelor of Computer Science (Honours) at
Khwaja Fareed University of Engineering & Information Technology.
Approved by:
Signature : _________________________
Date : _________________________
III
ACKNOWLEDGEMENT
We would like to thank everyone who had contributed to the successful completion of this
project. We would like to express our gratitude to our Project supervisor, Dr Mujeeb Ur Rehman
for his invaluable advice, guidance and his enormous patience throughout the development of the
research.
In addition, we would also like to express our gratitude to our loving parents and Fellows who
had helped and given me/us encouragement.
IV
ABSTRACT
The project entitled “Heart Disease’s Prediction System” is to develop a program keeping in
view the needs of predicting that either a person having Heart Disease or not. Heart Disease is
considered one of the most fatal and terrible diseases that causes many deaths worldwide.
According to the World Health Organization, 17.9 million people die every year due to this
disease. In just Pakistan, the number of deaths is 25,122 per year, accompanied by millions of
active cases. This project is a web application based program in which our predictive model uses
the top machine algorithm (support vector machine k- nearest neighbour K-NN, decision tree,
logistic regression Naive Bayes, Decision Tree algorithms) for heart disease prediction and
finally to be an algorithm with maximum accuracy used in the web application after its test
process. And the algorithms trained on the UCI Heart Disease repository dataset. Our system
assures the preservation of the cost and the time of the user. There are two modules of the
application, one is the admin and the other is the user which has been given the facilities like
prediction, The print report, Check previous prediction results, Feedback with single click. While
the admin is accountable for the Dataset and Database of the users, check which users have used
the web application at which time or for which purpose.
V
TABLE OF CONTENTS
CHAPTER 1...................................................................................................................................1
INTRODUCTION.........................................................................................................................1
1.1 INTRODUCTION.....................................................................................................................1
1.2 PROBLEM STATEMENT.........................................................................................................1
1.3 OBJECTIVE............................................................................................................................2
1.4 PROJECT SCOPE....................................................................................................................2
1.5 ADVANTAGES OF PROPOSED SOLUTION...............................................................................2
1.6 RELEVANCE TO STUDY PROGRAM.......................................................................................3
1.7 CHAPTER SUMMARY............................................................................................................3
CHAPTER 2...................................................................................................................................4
EXISTING SYSTEM....................................................................................................................4
CHAPTER 3...................................................................................................................................6
REQUIREMENT ENGINEERING.............................................................................................6
VI
3.3.1 Functional Requirements.............................................................................................7
3.3.2 Non-Functional Requirements.....................................................................................8
3.3.3 Requirement Baseline................................................................................................10
3.3.4 Need to Feature Mapping..........................................................................................11
3.4 HURDLES IN OPTIMISING THE CURRENT SYSTEM..............................................................11
3.5 CHAPTER SUMMARY..........................................................................................................11
CHAPTER 4.................................................................................................................................12
DESIGN........................................................................................................................................12
VII
LIST OF TABLES
VIII
LIST OF FIGURES
IX
CHAPTER 4 DESIGN
Chapter 1
Introduction
1.1 Introduction
The Machine learning has improved A lot of the fields related to the human and the
Healthcare is one of them. In healthcare, machine learning is specifically used for the
detection of diseases to make the diagnose process Effective and Accurate. Similarly for
the Detection of Heart Disease Machine learning provides algorithms that can be used for
detection of the heart disease.
In our proposed system we will focus on overcoming the problem of detection of Heart
Disease. While using Machine Learning algorithms at Basic Level with good accuracy of
detection. Moreover, our system will be reducing the cost of the diagnosis. And leads to
better treatment to the heart Leads this project is the initial level and for sure this Project
is going to be helpful to the Health care Sector. And this project ultimately goes long for
in the future for the detection of this particular Disease.
Moreover, the machine errors also lead towards the wrong detection through which
correct treatment couldn't occur. As a result, it causes an increase in the number of
deaths. Therefore, by using this platform a person can easily get to know that either he
has heart disease or not by fulfilling few parameters, which cost him nothing as compared
to other costly and insufficient tests. So once he gets his result, based on that his
10
CHAPTER 4 DESIGN
treatment can be started at an initial phase. So this platform is beneficial for those who
are eager to know about having Heart Disease or not.
1.3 Objective
11
CHAPTER 4 DESIGN
3rd Phase
Analysis
4th Phase
Testing and improving security
12
CHAPTER 4 DESIGN
Similarly, when the health care sector wants this type of prediction model, a computer
scientist use his knowledge to the fullest in order to create such predictive models that
fulfil needs of Healthcare sector
13
CHAPTER 4 DESIGN
Chapter 2
Existing Systems
So currently several systems are available for the prediction of Heart Disease. Like some
of them are typical hospital tests that are being conducted for the purpose of heart
Disease prediction and the others are numerous online predictors, all these are
accompanied by a lot of drawbacks and hindrances, therefore we need to replace them
with exceptional and advanced features holding systems.
14
CHAPTER 4 DESIGN
The other main shortcoming of the current system is really time-consuming as compared
to the modern heart disease prediction systems.
Wrong diagnose leads to wrong treatment:
Due to minimum accuracy problems, the current systems can lead to the wrong treatment
which is basically a threat to the patient's life, and in some cases, it can really become the
cause of the patient's demise as well.
Not proper user management:
As we have seen, there are various online predictors available which lack behind in
giving precise or proper user management, due to which users can't get aided or
facilitated suitably.
As we have seen that there are numerous problems in the current systems such as
minimum accuracy, time-consuming, etc., and one of the main reasons for deaths can be
the diagnosis of the disease due to the above reasons.
The currently available systems are having serious accuracy issues as they delay accuracy
of prediction which leads to the faulty detection of disease, which leads to the wrong
15
CHAPTER 4 DESIGN
diagnose. So to get on-time results we should replace the current system by providing and
ensuring good results in the latest and modern system.
This project provided the same facility for heart disease and saves the cost of funds and
time, also providing the best accuracy of heart disease prediction and is quite effective for
the people who are eager to know that whether they have heart disease or not using this
portal and in near future, it will become the primary need of the people related to this
particular disease.
Chapter 3
Requirement Engineering
In our system, the backend role is managed by the admin, and the user simply visits the
website to register. After registration user login to the user module, choose services that
are required from the module, and those services are then offered. The services like
prediction, Print report, check previous prediction results, Feedback is available there.
16
CHAPTER 4 DESIGN
If the user selects the prediction, then the user is asked to enter few parameters asked next
to the form provided to the user, after clicking to prediction, this service is provided to
the user, so simply this web application provides all amenities and conveniences to the
user just in one click.
3.2.2 Stakeholders
The main stakeholders being involved are:
Admin
End user
3.2.3 Domain
Web application
Tools: Html, CSS, JavaScript, Python, DjangoFramework, php, mysql,
python(ML)
17
CHAPTER 4 DESIGN
18
CHAPTER 4 DESIGN
Function Feedback
Description User can gives his recommendation and suggestion
Input Source Register user
Output User suggestion has been sent
Side effect None.
Descriptions Page loading speed should be First and page loading must be a click away
Less page loading speed shows bad impact to users.
Side Effect
Non-Functional
Requirement Responsiveness
Descriptions Websites should transform responsively and fast at all screen resolutions on
different browsers and platforms.
Side Effect Not responsiveness will leads to less traffic on site
19
CHAPTER 4 DESIGN
20
CHAPTER 4 DESIGN
In the end, we are at the conclusion that this web application will be covering the needs of
the people that are facing the heart disease detection problem and will provide the facilities
by minimizing the cost factor and maximizing the prediction accuracy.
Chapter 4
Design
The Spiral Model is an evolutionary software process model that couples the iterative
nature of prototyping with the controlled and systematic aspects of the linear sequential
model. Using the Spiral model, the software is developed in order of incremental
releases. It provides the potential for rapid development of incremental versions of the
software.
21
CHAPTER 4 DESIGN
Customer Communication
Tasks required establishing effective communication between developer & customer.
Planning
Determination of objectives, alternatives, and constraints
Risk Analysis
Analysis alternatives and attempts to identify and resolve the risks involved
Development
Product development and testing product
Assessment
Customer evaluation
22
CHAPTER 4 DESIGN
Indefinite Time
Spiral model may go indefinite time as if our robot sensors have not preciously placed.
Documentation
23
CHAPTER 4 DESIGN
In every increment documentation of our required more concentration to correctly written for
each and every stage.
4.4 Design
24
CHAPTER 4 DESIGN
25
CHAPTER 4 DESIGN
System Flow Diagram is defined graphical and sequential representation of the major steps
involved in a systematic process of our project.
26
CHAPTER 4 DESIGN
27
CHAPTER 4 DESIGN
Class Diagram
28
CHAPTER 4 DESIGN
Activity Diagram
29
CHAPTER 4 DESIGN
Sequence Diagram
30
CHAPTER 4 DESIGN
31
CHAPTER 4 DESIGN
Component Diagram
Component Diagram
4.5 Summary
It is crucial to choose an appropriate process model according to the project so that future
work will go smoothly and risk-free along with incurring a low cost. In this chapter, we
choose the spiral process model as it is suitable and appropriate furthermore limitations and
befits are discussed as it is incremental and prototyping helps us to make our project
according to the users' need moreover diagrammatically project is explained in this chapter.
32
CHAPTER 4 DESIGN
LIST OF SYMBOLS
& And
/ OR
- Dash
| Vertical bar
= Equal
# Number
0 off
1 on
Fig Figure
ement
33