0% found this document useful (0 votes)
71 views55 pages

A Project Report CPP

The document is a project report on 'Heart Disease Prediction Using Machine Learning' developed by four students under the guidance of Ms. A.D. Mate as part of their Diploma in Computer Technology. The project aims to create a predictive system using machine learning algorithms to assist medical professionals in diagnosing heart disease based on various clinical features, achieving an accuracy of approximately 89%. It includes acknowledgments, an abstract, and a detailed index outlining the project's structure and content.

Uploaded by

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

A Project Report CPP

The document is a project report on 'Heart Disease Prediction Using Machine Learning' developed by four students under the guidance of Ms. A.D. Mate as part of their Diploma in Computer Technology. The project aims to create a predictive system using machine learning algorithms to assist medical professionals in diagnosing heart disease based on various clinical features, achieving an accuracy of approximately 89%. It includes acknowledgments, an abstract, and a detailed index outlining the project's structure and content.

Uploaded by

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

A

PROJECT REPORT
ON
HEART DISEASE PREDICTION USING
MACHINE LEARNING

DEVELOPED BY:

ABHAYRAJ GODAMBE 02

ADARSH SINGH 03

DEV PANPALIYA 05

VAISHNAVI DIMBLE 07

UNDER GUIDANCE OF
MS. A.D MATE

IN PARTIAL FULFILLMENT OF
DIPLOMA IN COMPUTER TECHNOLOGY
2021-2022

SINHGAD TECHNICAL EDUCATION SOCIETY’S

SOU. VENUTAI CHAVAN POLYTECHNIC, PUNE, 411046.


MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION, MUMBAI.
SINHGAD TECHNICAL EDUCATION SOCIETY’S

SOU. VENUTAI CHAVAN POLYTECHNIC, PUNE,411046.


: CERTIFICATE :
THIS IS TO CERTIFY THAT
ABHAYRAJ GODAMBE 02
ADRSH SINGH 03
DEV PANPALIYA 05
VAISHNAVI DIMBLE 07

OF THIRD YEAR DIPLOMA IN COMPUTER TECHNOLOGY


HAVE SUCCESSFULLY COMPLETED PROJECT

HEART DISEASE PREDICTION USING


MACHINE LEARNING
IN PARTIAL FULFILLMENT OF
ACADEMIC REQUIREMENT FOR THE YEAR
2021-2022
AS PRESCRIBED BY
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION, MUMBAI

DATE:

PLACE: PUNE

MS. A. D. MATE Mrs. A. V. KURKUTE Dr. (Mrs.) M. S. JADHAV

(Project Guide) (Head of Department) (Principal)


Annexure A

CERTIFICATE

This is to certify that Mr. Abhayraj Godambe from Sou. Venutai Chavan
Polytechnic College having Enrolment No. 1900400204 has completed project of
Final Year having Title “HEART DISEASE PREDICTION USING MACHINE
LEARNING” during academic year 2021-2022. The project completed by
individually/ in a group consisting of 4 persons under the guidance of the Faculty
Guide.

Name & Signature of Guide

Name: Ms. A. D. MATE


Annexure A

CERTIFICATE

This is to certify that Mr. Adarsh Singh from Sou. Venutai Chavan Polytechnic
College having Enrolment No. 1900400215 has completed project of Final Year
having Title “HEART DISEASE PREDICTION USING MACHINE
LEARNING” during academic year 2021-2022. The project completed by
individually/ in a group consisting of 4 persons under the guidance of the Faculty
Guide.

Name & Signature of Guide

Name: Ms. A. D. MATE


Annexure A

CERTIFICATE

This is to certify that Mr. Dev Panpaliya from Sou. Venutai Chavan Polytechnic
College having Enrolment No. 1900400174 has completed project of Final Year
having Title “HEART DISEASE PREDICTION USING MACHINE
LEARNING” during academic year 2021-2022. The project completed by
individually/ in a group consisting of 4 persons under the guidance of the Faculty
Guide.

Name & Signature of Guide

Name: Ms. A. D. MATE


Annexure A

CERTIFICATE

This is to certify that Ms. Vaishnavi Dimble from Sou. Venutai Chavan
Polytechnic College having Enrolment No. 1900400168 has completed project of
Final Year having Title “HEART DISEASE PREDICTION USING MACHINE
LEARNING” during academic year 2021-2022. The project completed by
individually/ in a group consisting of 4 persons under the guidance of the Faculty
Guide.

Name & Signature of Guide

Name: Ms. A. D. MATE


ACKNOWLEDGEMENTS

It is a great pleasure for me to acknowledge the assistance and


contribution of number of individuals who helped me in developing “Website
for Heart Disease Prediction” project. A project is defined as a piece of work
that needs skill, effort and careful planning, but duringthe course of the project we
found that it not only sharpened our logical skills butalso taught us the value joint
effort and hard work. A successful project is the result of good team work, which
consists not only the people who put efforts butalso who guide them.
First and fore most I wish to record my gratitude and thanks to Ms.
A. D. Mate for her enthusiastic guidance and help in successful completion of
seminar. I express my thanks to Dr. (Mrs.) M. S. Jadhav (Principal), Mrs. A.V.
Kurkute (Head of Department, Computer Technology) and Mrs. S.S.
Velapure (Project Coordinator) for their valuable guidance. I am also thankful
to other teachers and non-teaching staff of ComputerTechnology Department and
Library for their co-operation and help.
Lastly, I need to extend my thanks to all those, who helped us
directly or indirectly in completing this esteem project.

ABHAYRAJ GODAMBE
ADARSH SINGH
DEV PANPALIYA
VAISHNAVI DIMBLE
ABSTRACT

The diagnosis of heart disease in most cases depends on a complex combination of clinical
and pathological data. Because of this complexity, there exists a significant amount of interest
among clinical professionals and researchers regarding the efficient and accurate prediction of
heart disease.
In this project, we develop a heart disease predict system that can assist medical
professionals in predicting heart disease status based on the clinical data of patients. Our
approaches include three steps. Firstly, we select 13 important clinical features, i.e., age, sex,
chest pain type, trestbps, cholesterol, fasting blood sugar, resting ecg, max heart rate,
exercise induced angina, old peak, slope, number of vessels colored, and thal. Secondly, we
develop an artificial neural network algorithm for classifying heart disease based on these clinical
features. The accuracy of prediction is near 89%.
Finally, we develop a user-friendly heart disease predict system (HDPS). The HDPS
system will be consisted of multiple features, including input clinical data section, ROC curve
display section, and prediction performance display section (execute time, accuracy, sensitivity,
specificity, and predict result). Our approaches are effective in predicting the heart disease of a
patient. The HDPS system developed in this study is a novel approach that can be used in the
classification of heart disease.
We need to put a system in place to be able to detect the symptoms of a heart stroke at an
early stage and thus prevent it. It is impractical for a common man to frequently undergo costly
tests like the ECG and thus there needs to be a system in place which is handy and at the same
time reliable, in predicting the chances of a heart disease. Thus, we propose to develop an
application which can predict the vulnerability of a heart disease given basic symptoms like age,
sex, pulse rate etc. The machine learning algorithm neural networks has proven to be the most
accurate and reliable algorithm and hence used in the proposed system.
DECLARATION

This project is presented as part of the academic interest in research. I hereby declare that this
project is entirely the result of hard work, research and enquires. I am confident that this
project work is not copied from any other person. All sources of information have however
been acknowledged with due respect.
INDEX
Sr.No. Title Page
no.
1. INTRODUCTION 1

1.1 BASICS 2

1.2 OBJECTIVES 3

2. LITERATURE REVIEW 4

3. SYSTEM OVERVIEW 7

3.1 EXISTING SYSTEM 8

3.2 NEED FOR SYSTEM 8

3.3 PROPOSED SYSTEM 9

4. SYSTEM REQUIREMENTS 10

4.1 HARDWARE REQUIREMENTS 11

4.2 SOFTWARE REQUIREMENTS 11

4.3 TOOLS INFORMATION 12

5. PROJECT MANAGEMENT 14

5.1 PROJECT METHODOLOGY 15

5.2 WORKFLOW 15

5.2 ALGORITHM 16

5.4 FLOWCHART 17

6. FEASIBILITY STUDY 18
6.1 TECHNICAL FEASIBILITY 19

6.2 ECONOMIC FEASIBILITY 19

6.3 OPERATIONAL FEASIBILITY 20

7. SYSTEM DESIGN 21

7.1 ARCHITECTURE OF THE PROJECT 22

7.2 UML DIAGRAM 23

7.3 DFD 24

7.4 ER DIAGRAM 25

8. SCREENSHOT 26

8.1 HOME PAGE 27

8.2 REGISTRATION FORM 27

8.3 PATIENT HAVING 28

LOW PROBABILITY

8.4 PATIENT HAVING 29

HIGH PROBABILITY

9. TEST CASE 30

10. FUTURE SCOPE 37

11. CONCLUSION 39

12. BIBLIOGRAPHY REFERENCES 41


INDEX OF FIGURES

FIG NO. TITLE PG NO.

5.2 WORKFLOW 15

5.4 FLOWCHART 17

7.1 WORKFLOW 22

7.2 STAR UML DIAGRAM 23

7.3 DFD 24

7.4 ER DIAGRAM 25

8.1 HOME PAGE 27

8.2 REGISTRATION FORM 27

8.3 PATIENT SHOWING LOW PROBABILITY OF 28

HEART DISEASE

8.4 PATIENT SHOWING HIGH PROBABILITY OF 29

HEART DISEASE
INDEX OF TABLES

TABLE NO. TITLE PG NO.

4.1 HARDWARE REQUIREMENTS 11

4.2 HARDWARE REQUIREMENTS 11

9.3 TEST CASES 33


Heart Disease Prediction using Machine Learning

CHAPTER 1
INTRODUCTION

SVCP.COMPUTER TECHNOLOGY.2021-2022 1
Heart Disease Prediction using Machine Learning

1. INTRODUCTION

1.1. BASIC

With the rampant increase in the heart stroke rates at juvenile ages, we need to put a system
in place to be able to detect the symptoms of a heart stroke at an early stage and thus prevent it. It
is impractical for a common man to frequently undergo costly tests like the ECG and thus there
needs to be a system in place which is handy and at the same time reliable, in predicting the
chances of a heart disease. Thus, we propose to develop an application which can predict the
vulnerability of a heart disease given basic symptoms like age, sex, pulse rate etc. The machine
learning algorithm neural networks has proven to be the most accurate and reliable algorithm and
hence used in the proposed system.
There is no lack of records regarding medical symptoms of patients suffering heart strokes.
However, the potential they have-to help us foretell similar possibilities in seemingly healthy
adults are going unnoticed. For instance: As per the Indian Heart Association, 50% of heart strokes
occur under 50 years of age and 25% of all heart strokes occur under 40 years of age in Indians.
Urban population is thrice as vulnerable to heart attacks as rural population.
Machine learning is an emerging subdivision of artificial intelligence. Its primary focus is to
design systems, allow them to learn and make predictions based on the experience. It trains
machine learning algorithms using a training dataset to create a model. The model uses the new
input data to predict heart disease. Using machine learning, it detects hidden patterns in the input
dataset to build models. It makes accurate predictions for new datasets. The dataset is cleaned and
missing values are filled.
The model uses the new input data to predict heart disease and then tested for accuracy.

SVCP.COMPUTER TECHNOLOGY.2021-2022 2
Heart Disease Prediction using Machine Learning

1.2. OBJECTIVES

• The main objective of this research is to develop a heart prediction system.


• The system can discover and extract hidden knowledge associated with diseases from a
historical heart data set.
• Provides new approach to concealed patterns in the data.
• Helps avoid human biasness.
• To implement Decision tree (CatBoost) classifier that classifies the disease as per the input
of the user.
• Reduce the cost of medical tests.

SVCP.COMPUTER TECHNOLOGY.2021-2022 3
Heart Disease Prediction using Machine Learning

CHAPTER 2
LITERATURE REVIEW

SVCP.COMPUTER TECHNOLOGY.2021-2022 4
Heart Disease Prediction using Machine Learning

2. LITERATURE REVIEW

[1] HEART DISEASE PREDICTION USING MACHINE LEARNING


ALGORITHMS, Harshit Jindal.

Day by day the cases of heart diseases are increasing at a rapid rate and it’s very Important and
concerning to predict any such diseases beforehand. This diagnosis is a difficult task i.e., it should
be performed precisely and efficiently. The research paper mainly focuses on which patient is
more likely to have a heart disease based on various medical attributes. We prepared a heart
disease prediction system to predict whether the patient is likely to be diagnosed with a heart
disease or not using the medical history of the patient. We used different algorithms of machine
learning such as logistic regression and KNN to predict and classify the patient with heart disease.
A quite Helpful approach was used to regulate how the model can be used to improve the accuracy
of prediction of Heart Attack in any individual. The strength of the proposed model was quiet
satisfying and was able to predict evidence of having a heart disease in a particular individual by
using KNN and Logistic Regression which showed a good accuracy in comparison to the
previously used classifier such as naive bayes etc. So a quiet significant amount of pressure has
been lift off by using the given model in finding the probability of the classifier to correctly and
accurately identify the heart disease. The Given heart disease prediction system enhances medical
care and reduces the cost.

[2] HEART DISEASE PREDICTION USING MACHINE LEARNING


TECHNIQUES, Devansh Shah, Samir Patel, Dr. Santosh Kumar Bharti on
16th October 2021.

Heart disease, alternatively known as cardiovascular disease, encases various conditions that
impact the heart and is the primary basis of death worldwide over the span of the past few decades.
It associates many risk factors in heart disease and a need of the time to get accurate, reliable, and
sensible approaches to make an early diagnosis to achieve prompt management of the disease.
Data mining is a commonly used technique for processing enormous data in the healthcare
domain. Researchers apply several data mining and machine learning techniques to analyze huge
complex medical data, helping healthcare professionals to predict heart disease. This research
paper presents various attributes related to heart disease, and the model on basis of supervised

SVCP.COMPUTER TECHNOLOGY.2021-2022 5
Heart Disease Prediction using Machine Learning

learning algorithms as Naïve Bayes, decision tree, K-nearest neighbour, and random forest
algorithm. It uses the existing dataset from the Cleveland database of UCI repository of heart
disease patients. The dataset comprises 303 instances and 76 attributes. Of these 76 attributes,
only 14 attributes are considered for testing, important to substantiate the performance of different
algorithms. This research paper aims to envision the probability of developing heart disease in the
patients. The results portray that the highest accuracy score is achieved with K-nearest neighbour.

[3] HDPS: HEART DISEASE PREDICTION SYSTEM, A H Chen.

The diagnosis of heart disease in most cases depends on a complex combination of clinical and
pathological data. Because of this complexity, there exists a significant amount of interest among
clinical professionals and researchers regarding the efficient and accurate prediction of heart
disease. In this paper, we develop a heart disease predict system that can assist medical
professionals in predicting heart disease status based on the clinical data of patients. Our
approaches include three steps. Firstly, we select 13 important clinical features, i.e., age, sex, chest
pain type, trestbps, cholesterol, fasting blood sugar, resting ecg, max heart rate, exercise induced
angina, old peak, slope, number of vessels colored, and thal. Secondly, we develop an artificial
neural network algorithm for classifying heart disease based on these clinical features. The
accuracy of prediction is near 80%. Finally, we develop a user-friendly heart disease predict
system (HDPS). The HDPS system will be consisted of multiple features, including input clinical
data section, ROC curve display section, and prediction performance display section (execute
time, accuracy, sensitivity, specificity, and predict result). Our approaches are effective in
predicting the heart disease of a patient. The HDPS system developed in this study is a novel
approach that can be used in the classification of heart disease.

SVCP.COMPUTER TECHNOLOGY.2021-2022 6
Heart Disease Prediction using Machine Learning

CHAPTER 3
SYSTEM OVERVIEW

SVCP.COMPUTER TECHNOLOGY.2021-2022 7
Heart Disease Prediction using Machine Learning

3. SYSTEM OVERVIEW

3.1 Existing system

With growing development in the field of medical science alongside machine learning various
experiments and researches has been carried out in these recent years releasing the relevant
significant papers. The paper proposes heart disease prediction using KStar, J48, SMO, and Bayes
Net and Multilayer perceptron using WEKA software. Based on performance from different factor
SMO (89% of accuracy) and Bayes Net (87% of accuracy) achieve optimum performance than
KStar, Multilayer perceptron and J48 techniques using k-fold cross validation. The accuracy
performance achieved by those algorithms are still not satisfactory. So that if the performance of
accuracy is improved more to give batter decision to diagnosis disease. In research conducted
using Cleveland dataset for heart diseases which contains 303 instances and used 10-fold Cross
Validation, considering 13 attributes, implementing 4 different algorithms, they concluded
Gaussian Naïve Bayes and Random Forest gave the maximum accuracy of 91.2 percent. Using
the similar dataset of Framingham, Massachusetts, the experiments were carried out using 4
models and were trained and tested with maximum accuracy K Neighbors Classifier: 87%,
Support Vector Classifier: 83%, Decision Tree Classifier: 79% and Random Forest Classifier:
84%.

3.2 Need for system

The prediction of heart disease can prevent life threats. In this paper machine learning algorithm
is applied to compare the results and analysis of the Heart Disease dataset. The dataset consists of
11 main attributes used for performing the analysis. As time is passing, a lot of research data and
patients records of hospitals are available. There are many open sources for accessing the patient’s
records and researches can be conducted so that various computer technologies could be used for
doing the correct diagnosis of the patients and detect this disease to stop it from becoming fatal.
Nowadays it is well known that machine learning and artificial intelligence are playing a huge
role in the medical industry. We can use different machine learning and deep learning models to
diagnose the disease and classify or predict the results. A complete genomic data analysis can
easily be done using machine learning models. Models can be trained for knowledge pandemic
predictions and also medical records can be transformed and analyzed more deeply for better
predictions.

SVCP.COMPUTER TECHNOLOGY.2021-2022 8
Heart Disease Prediction using Machine Learning

3.3 Proposed system

In this system we are implementing effective heart attack prediction system using Catboost
algorithm. We can give the input as in CSV file to the system. After taking input the algorithms
apply on that input that is Catboost. After accessing data set the operation is performed and
effective heart attack level is produced.
The proposed system will add some more parameters significant to heart attack with their sex,
age and the priority levels are by consulting expertise doctors and the medical experts. The heart
attack prediction system designed to help the identify different risk levels of heart attack like
normal, low or high and also giving the prescription details with related to the predicted result.

SVCP.COMPUTER TECHNOLOGY.2021-2022 9
Heart Disease Prediction using Machine Learning

CHAPTER 4
SYSTEM REQUIREMENT

SVCP.COMPUTER TECHNOLOGY.2021-2022 10
Heart Disease Prediction using Machine Learning

4. HARDWARE AND SOFTWARE

4.1. Hardware Requirements

SR.NO. REQUIREMENTS

1 Windows 10 Operating System, Intel Core i5, 6th Generation

2 Processor: Minimum 1.3 GHz required. (1.5 recommended)

3 RAM: 8 Gigabyte

4.2. Software Requirements

SR.NO. REQUIREMENTS

1 Jupyter Notebook

2 Python Libraries

3 Visual Studio Code

4 Flask Framework

SVCP.COMPUTER TECHNOLOGY.2021-2022 11
Heart Disease Prediction using Machine Learning

4.3. Tools Information

4.3.1. Jupyter Notebook


The Jupyter Notebook is an open-source web application that allows you to create and share
documents that contain live code, equations, visualizations, and narrative text. Its uses include
data cleaning and transformation, numerical simulation, statistical modeling, data visualization,
machine learning, and much more.
Jupyter Notebook (formerly IPython Notebooks) is a web-based interactive computational
environment for creating Jupyter notebook documents. The “notebook” term can colloquially
make reference to many different entities, mainly the Jupyter web application, Jupyter Python
web server, or Jupyter document format depending on context.

4.3.2. Python Libraries

• Numpy: To work with arrays

• Pandas: To work with csv files and dataframes

• Matplotlib: To create charts using pyplot, define parameters using rcParams and color
them with cm.rainbow

• Warnings: To ignore all warnings which might be showing up in the notebook due to
past/future depreciation of a feature

• train_test_split: To split the dataset into training and testing data

• StandardScaler: To scale all the features, so that the Machine Learning model better
adapts to the dataset.

SVCP.COMPUTER TECHNOLOGY.2021-2022 12
Heart Disease Prediction using Machine Learning

4.3.3. Visual Studio Code

Visual Studio Code, also commonly referred to as VS Code, is a source-code editor made by
Microsoft for Windows, Linux and macOS. Features include support for debugging, syntax
highlighting, intelligent code completion, snippets, code refactoring, and embedded Git.
Visual Studio Code is a source-code editor that can be used with a variety of programming
languages, including Java, JavaScript, Go, Node.js, Python and C++.

4.3.4. Flask Framework


Flask is a micro web framework written in Python. It is classified as a microframework because
it does not require particular tools or libraries. It has no database abstraction layer, form
validation, or any other components where pre-existing third-party libraries provide common
functions. However, Flask supports extensions that can add application features as if they were
implemented in Flask itself. Extensions exist for object-relational mappers, form validation,
upload handling, various open authentication technologies and several common framework
related tools.

SVCP.COMPUTER TECHNOLOGY.2021-2022 13
Heart Disease Prediction using Machine Learning

CHAPTER 5
PROJECT MANAGEMENT

SVCP.COMPUTER TECHNOLOGY.2021-2022 14
Heart Disease Prediction using Machine Learning

5. PROJECT MANAGEMENT

5.1. Project Methodology

The proposed work predicts heart disease by exploring the mentioned classification i.e., Decision
tree (CatBoost) algorithm and does performance analysis. The objective of this study is to
effectively predict if the patient suffers from heart disease. The health professional enters the input
values from the patient's health report. The data is fed into model which predicts the probability
of having heart disease.
CatBoost is an algorithm for gradient boosting on decision trees. It is developed by Yandex
researchers and engineers.

5.2. Workflow

Validating and verifying Dividing the project into


Design structure of several modules and
resources required for
the Software. working on each of
developing the software.
them.

Verifying working of
Preparing the test each module and
Testing the final plan for the
website. combining for the final
software. website creation.

SVCP.COMPUTER TECHNOLOGY.2021-2022 15
Heart Disease Prediction using Machine Learning

5.3. Algorithm

The algorithm used in this project is Decision tree (CatBoost). CatBoost or Categorical Boosting
is an open-source boosting library developed by Yandex. In addition to regression and
classification, CatBoost can be used in ranking, recommendation systems, forecasting and even
personal assistants.
Following are some models of CatBoost which we used in our project-

1) # Instantiate model
model = CatBoostClassifier(**params)
# Fit model
model.fit(
x_train,
y_train,
cat_features=cat_features,
eval_set=(x_test, y_test),
verbose=50,
plot=True
)

2) #Final model
final_model = CatBoostClassifier(**final_params)
final_model.fit(x,y,verbose=100)
# Export model
model_name = f'heart_disease_model_{str(datetime.today())[0:10]}'
final_model.save_model(MODEL_STORAGE_PATH + model_name)

SVCP.COMPUTER TECHNOLOGY.2021-2022 16
Heart Disease Prediction using Machine Learning

5.4. Flowchart

SVCP.COMPUTER TECHNOLOGY.2021-2022 17
Heart Disease Prediction using Machine Learning

CHAPTER 6
FEASIBILITY STUDY

SVCP.COMPUTER TECHNOLOGY.2021-2022 18
Heart Disease Prediction using Machine Learning

6. Feasibility study

The concept of feasibility is to determine whether or not a project is worth doing. The process
followed is making this determination is called feasibility study. Once it has been determined that
project is feasible, the system analyst can go ahead and prepare the project specification which
finalizes project requirements.

6.1. Technical feasibility

This is concerned with specifying equipment and software that will successfully satisfy the user
requirements. Technical needs of the system include.
In examining technical feasibility, configuration of the system is given more importance than the
actual makes of hardware.
Configuration should give the complete picture about the system’s requirements so that they could
operate and communicate smoothly. The hardware needed to carry out this project includes with
8 GB RAM and at least intel i5 processor. The software needed to carry out this project includes
Jupyter Notebook, Python Libraries, Visual Studio Code and Flask Framework. So, the
technology required to carry out this project is easily available.

6.2. Economic feasibilty

Economic analysis is the most frequently used technique for evaluating the effectiveness of a
proposed system, most commonly known as cost benefits analysis. Financial feasibility must
consider costs that go beyond equipment acquisition, maintenance, and operation, support staffing
needs, etc. This project will save a considerable amount of labor in managing paper files, but some
of these savings will be offset by new tasks that are introduced, such as modifying the interface
that the patients will find easy to access. These new modifications are an important part of the
economic feasibility. Any study of financial feasibility also must consider non-quantitative costs
and benefits of a project. Sometimes a particular system may not appear to be feasible from a
purely quantitative perspective, but the non-quantitative benefits are so significant that they
overcome a cost-benefit ratio that is not optimal.

SVCP.COMPUTER TECHNOLOGY.2021-2022 19
Heart Disease Prediction using Machine Learning

6.3. Operational feasibility

This is mainly related to medical organization. The points to be considered are: Remote access
the prediction of heart disease, simple to understand and access to the user. It’s safe, secure and
always available, on demand. So, whether the user are from small areas or large – or even just a
single this application works for all and therefore the wait of the users to get results for predicting
heart disease would get much reduced or null. Hence this project is operationally feasible.

SVCP.COMPUTER TECHNOLOGY.2021-2022 20
Heart Disease Prediction using Machine Learning

CHAPTER 7
SYSTEM DESIGN

SVCP.COMPUTER TECHNOLOGY.2021-2022 21
Heart Disease Prediction using Machine Learning

7. SYSTEM DESIGN

7.1 Architecture of the project

SVCP.COMPUTER TECHNOLOGY.2021-2022 22
Heart Disease Prediction using Machine Learning

7.2 UML Diagram

SVCP.COMPUTER TECHNOLOGY.2021-2022 23
Heart Disease Prediction using Machine Learning

7.3 Data Flow Diagram

SVCP.COMPUTER TECHNOLOGY.2021-2022 24
Heart Disease Prediction using Machine Learning

7.4 ER Diagram

SVCP.COMPUTER TECHNOLOGY.2021-2022 25
Heart Disease Prediction using Machine Learning

CHAPTER 8
SCREENSHOT

SVCP.COMPUTER TECHNOLOGY.2021-2022 26
Heart Disease Prediction using Machine Learning

8. Screenshots

8.1 Home page

8.2 Registration form

SVCP.COMPUTER TECHNOLOGY.2021-2022 27
Heart Disease Prediction using Machine Learning

8.3 Patient showing low probability of heart disease

SVCP.COMPUTER TECHNOLOGY.2021-2022 28
Heart Disease Prediction using Machine Learning

8.4 Patient showing high probability of heart disease

SVCP.COMPUTER TECHNOLOGY.2021-2022 29
Heart Disease Prediction using Machine Learning

CHAPTER 9
TESTCASE

SVCP.COMPUTER TECHNOLOGY.2021-2022 30
Heart Disease Prediction using Machine Learning

9. Test procedure

Software Testing is a critical element of software quality assurance and represents the ultimate
review of specification, design and coding.
Testing presents an interactive anomaly for the software engineers. The increasing visibility of
software quality assurance and attendant costs associated with software failure always were the
motivating force for well-planned through testing. Well planned and through testing is required
to deliver a good system.

Testing the software includes:

• Verify that it behaves “as specified”


• Detects errors
• Validate whether the outputs are as expected.
• Verification is the checking or testing of items, including software for confirmation
and consistency by evaluating the results against pre-specified requirements.
• Error detection: Testing should internally attempt to make the software take extreme
values, so that we can find out the boundary values. This way we can find the error in
our system.
• Validation looks at the system correction i.e., the process of checking that what
has been specified is what the user wanted.
• Testing principles: Some of the testing principles followed can begiven as:
• Testing plan and schedules were prepared and rectification of bugs was also worked
out as per test plan.
• Testing Procedures: Testing of system was basically done with the help of developer.
All care was taken so that the application did not violate any memory constraints.
After porting the application into the module if some bugs were reported they were
then cleared taking into consideration the module environment.

SVCP.COMPUTER TECHNOLOGY.2021-2022 31
Heart Disease Prediction using Machine Learning

9.1. Unit testing

Unit testing is a level of software testing where individual units/ components of a software are
tested. The purpose is to validate thateach unit of the software perform as designed. A unit is the
smallest testable part of any software. It usually has one or a few inputs and usually a single
output. In procedural programming, a unit may be an individual program, function, procedure,
etc. In object-oriented programming, the smallest unit is a method, which may belong to a base/
super class, abstract class or derived/ child class. (Some treat a module of an application as a unit.
This is to be discouraged as there will probably be many individual units withinthat module).
Unit testing frameworks ,drivers ,stubs and mock/fake objects are used to assist in unit testing.
Unit testing increases confidence in changing /maintaining code. If good unit tests are written
and if they are run every time any code is changed, we will be able to promptly catch any
defects introduced due to change.
Also, if codes are already made less interdependent to make unit testing possible, the unintended
impact of changes to any code is less. Codes are more reusable. In order to make unit testing
possible, codes need to be modulator. This means that codes are easier to reuse. Development is
faster. How? If you do not have unit testing in place, you write your code and perform that fuzzy
‘developer test’ (You set some breakpoints, fire up the GUI, provide a few inputs that hopefully
hit your code and hope that you are all set). But, if you have unit testing in place, you write the
test, write the code and run the test. Writing tests takes time but the time is compensated by the
less amount of time it takes to run the tests; You need not fire up the GUI and provide all those
inputs. And, of course, unit tests are more reliable than developer tests.
Development is faster in the long run too. How? The effort required to find and fix defects found
during unit testing is very less in comparison to the effort required to fix defects found during
system testing or acceptance testing.

SVCP.COMPUTER TECHNOLOGY.2021-2022 32
Heart Disease Prediction using Machine Learning

9.2. Integration testing

Big Bang is an approach to integration testing where all or most of the units are combined together
and tested at one go. This approach is taken when the testing team receives the entire software in
a handle. So, what is the difference between Big Bang Integration Testing and System Testing?
Well, the former tests only the interactions between the units while the latter tests the entire
system. Top Down is an approach to Integration Testing where top-level units are tested first and
lower-level units are tested step by step after that. This approach is when up down development
approach is followed. Test Stubs are needed to stimulate lower-level units which may not be
available during the initial phases.
Bottom Up is an approach to Integration Testing where bottom level units are tested first and
upper-level units’ step by step after that. This approach is taken when bottom-up development
approach is followed. Test drivers are needed to stimulate higher level units which may not be
available during the initial phases. Sandwich/Hybrid is an approach to integration Testing which
is a combination of Top Down and Bottom-Up approaches.

SVCP.COMPUTER TECHNOLOGY.2021-2022 33
Heart Disease Prediction using Machine Learning

9.3. Test cases:

Test Case Expected Actual


TC_id Test Case Steps Status
Description Results Result
TC_1 To check whether 1. Click on the given Heart Heart Pass
it launches the link Disease Disease
website for Heart 2. See if it launches Prediction Prediction
Disease Prediction the website website website is
3. Check the result should be opened
opened

TC_2 To check whether its 1. Click on the website The given The Pass
accepting Patients 2. Enter the values given
Data or not information should be values
3. Check whether it accepted are
accepts the values accepte
or not d and
display
ed
TC_3 To check whether 1. Click on Sex The sex The sex type Pass
it accept the sex icon and select type is displayed
or not the sex. should be properly
2. See if it selects the displayed
proper sex, like if
you select the
male it displays
the male in
the sex box or not
TC_4 To check 1. Select the The rating The rating of Pass
whether it Resting of Resting Resting ECG
accepts the ECG icon. ECG is displayed
resting ECG 2. Add should be
the displayed
ratin
g

TC_5 To check whether 1. Go to Chest The Chest It displays the Pass


it adds the type of Pain Type Pain Type Chest Pain
chest pain 2. Select the type should be Type
of Chest Pain displayed

SVCP.COMPUTER TECHNOLOGY.2021-2022 34
Heart Disease Prediction using Machine Learning

TC_6 To check whether 1. Select the The option The option for Pass
it accepts the Exercise Angina for Exercise Exercise
Exercise Angina 2. Select the option Angina Angina is
or not yes or no should be been selected
displayed and also been
displayed

TC_7 To check whether it 1. Go to ST Slope The type for The type for Pass
add the ST Slope or 2. Select the type ST Slope ST Slope is
not of slope should be displayed
displayed

TC_8 To check 1. Select the age icon The age The age Pass
whether it 2. Add your age should be is
accepts the displayed display
selected age or ed
not

TC_9 To check whether 1. Go to Resting The number The number Pass


the Resting Blood Blood Pressure for Resting for Resting
Pressure is displayed 2. Add your ratings Blood Blood
or not by using the Pressure Pressure is
corner button for should be displayed
increasing and displayed
decreasing the
rating

TC_10 To check whether is 1. Select the The The level of Pass


accepts the Cholesterol icon Cholesterol Cholesterol
Cholesterol level or 2. Enter the Level should is been
not number be displayed displayed
according to
your ratings

SVCP.COMPUTER TECHNOLOGY.2021-2022 35
Heart Disease Prediction using Machine Learning

TC_11 To check whether 1. Go to Fasting The value The is Pass


the Fasting Blood Blood Sugar icon should be displayed in
Sugar accepts the 2. Enter the value displayed in the block of
value or not the block of Fasting Blood
Fasting Blood Sugar
Sugar

TC_12 To check whether 1. Click on Max The Max The Max Pass
the Max Heart Rate Heart Rate Heart Rate Heart Rate is
accepts the given 2. Enter the value should be displayed
value or not of Max Heart displayed
Rate

TC_13 To check whether 1. Go to Oldpeak The value The value Pass


the heart rate in the 2. Enter the should be is
Oldpeak is been Oldpeak value accepted displayed
accepted or not and
displayed

TC_14 To check whether it 1. After entering the The model The model is Pass
calculates the Heart patients should run been working
Disease Probability information and should and is
and run the model or 2. The model should display the displaying the
not be run after result result
selecting ‘Run
Model’ button

TC_15 To check 1. Enter the Patients The result The result is Pass
whether it shows data should be displayed
the result 2. Run the model displayed using
3. Check the result including probability
4. The probability the and graph
and the graph probability
should be and the
displayed graph

SVCP.COMPUTER TECHNOLOGY.2021-2022 36
Heart Disease Prediction using Machine Learning

CHAPTER 10
FUTURE SCOPE

SVCP.COMPUTER TECHNOLOGY.2021-2022 37
Heart Disease Prediction using Machine Learning

10. Future scope

This project has been developed as part of the major project in syllabus. This has been initial
attempt by our group members and have tried our best to create this project user friendly as
possible.
The future scope of this project is the prediction of heart diseases by using advanced
techniques and algorithms in less time complexity.
In future we can also create an app interface which will have more advanced features than
that of the website and will be easy to access for patients i.e., an intelligent system may be
developed that can lead to selection of proper treatment methods for a patient diagnosed with
heart disease. A lot of work has been done already in making models that can predict whether a
patient is likely to develop heart disease or not. There are several treatment methods for a patient
once diagnosed with a particular form of heart disease. Data mining can be of very good help in
deciding the line of treatment to be followed by extracting knowledge from such suitable database.

SVCP.COMPUTER TECHNOLOGY.2021-2022 38
Heart Disease Prediction using Machine Learning

CHAPTER 11
CONCLUSION

SVCP.COMPUTER TECHNOLOGY.2021-2022 39
Heart Disease Prediction using Machine Learning

11. Conclusion

Towards the end of the project, I would like to say that the target, which was initially set up, was
achieved to a good extent. This Project made me realize the significance of developing software
for oneself, where the sole aim is to learn.

Finally, I come to the conclusion of this project. It is seen that heart diseases when aggravated
spiral way beyond control. Heart diseases are complicated and take away lots of lives every year.
When the early symptoms of heart diseases are ignored, the patient might end up with drastic
consequences in a short span of time. Sedentary lifestyle and excessive stress in today’s world
have worsened the situation. If the disease is detected early then it can be kept under control.
However, it is always advisable to exercise daily and discard unhealthy habits at the earliest.

Heart Disease Prediction System is an enhancement that makes predictions more effective by
having more accuracy and confidence level on the data at present, based on its knowledge and
behavior. The aim of this project is to provide the right patient with the right information at the
right time. A heart disease estimation system is based on two principal classification models: a
binary model (which is all about classifying the test data into either of the 2 classes available), a
multiclass classification (which classifies the test data into either of the classes available). An
important aspect of this project is its high capability of showing up good confidence level.

CatBoost is an algorithm for gradient boosting on decision trees. It is developed by Yandex


researchers and engineers, and is used for personal assistant, self-driving cars, heart disease
prediction and much more.

SVCP.COMPUTER TECHNOLOGY.2021-2022 40
Heart Disease Prediction using Machine Learning

CHAPTER 12
BIBLIOGRAPHY REFERENCE

SVCP.COMPUTER TECHNOLOGY.2021-2022 41
Heart Disease Prediction using Machine Learning

12. Bibliography

12.1. Papers

[1] HEART DISEASE PREDICTION USING MACHINE LEARNING ALGORITHMS,


Harshit Jindal.

[2] HEART DISEASE PREDICTION USING MACHINE LEARNING TECHNIQUES,


Devansh Shah, Samir Patel, Dr. Santosh Kumar Bharti on 16th October 2021.

[3] HDPS: HEART DISEASE PREDICTION SYSTEM, A H Chen.

12.2. Websites

[1] https://www.researchgate.net/publication/331589020_Heart_Disease_Prediction_
System#pf

[2] https://www.hindawi.com/journals/cin/2021/8387680/

[3] https://www.ijert.org/research/heart-disease-prediction-using-machine-learning-
IJERTV9IS040614.pdf

SVCP.COMPUTER TECHNOLOGY.2021-2022 42

You might also like