1822 B.E Cse Batchno 296
1822 B.E Cse Batchno 296
LEARNING TECHNIQUES
SCHOOL OF COMPUTING
SATHYABAMA
INSTITUTE OF SCIENCE AND TECHNOLOGY
(DEEMED TO BE UNIVERSITY)
MAY - 2022
i
SATHYABAMA
INSTITUTE OF SCIENCE AND TECHNOLOGY
(DEEMED TO BE UNIVERSITY)
Accredited with Grade “A” by NAAC
JEPPIAAR NAGAR, RAJIV GANDHI SALAI, CHENNAI - 600 119
www.sathyabama.ac.in
BONAFIDE CERTIFICATE
This is to certify that this Project Report is the bonafide work of SAI SRIRAM KRISHNA PARIMI -
(38119501), Y.SNEHITH REDDY - (38110544) who carried out the project entitled
“ PREDICTION OF MULTIPLE DISEASE USING MACHINE LEARNING
TECHNIQUES ” under my supervision from AUG 2021 to MARCH 2022.
Internal Guide
Dr. S. Jancy MCA.,MBA., M.Tech., Ph.D.,
Head of the Department
Dr. L.Lakshmanan M.E., Ph.D.,
Dr.S.Vigneshwari M.E., Ph.D.,
ii
DECLARATION
We Sai SriRam Krishna Parimi - (38119501), Y.Snehith Reddy - (38110544) hereby declare that
the Project Report entitled “PREDICTION OF MULTIPLE DISEASE USING
MACHINE LEARNING TECHNIQUES” done by us under the guidance of Dr.S.Jancy
MCA.,MBA.,M.TECH.,Ph.D., at SATHYABAMA INSTITUTE OF SCIENCE AND
TECHNOLOGY is submitted In partial fulfilment of the requirements for the award of Bachelor of
Engineering degree in Computer science and Engineering.
DATE : (1)
PLACE : (2)
iii
ACKNOWLEDGEMENT
We are pleased to acknowledge our sincere thanks to Board of Management of SATHYABAMA for their
kind encouragement in doing this project and for completing it successfully. We are grateful to them.
I convey my thanks to Dr. T.Sasikala, M.E., Ph.D., Dean , School of computing and Dr.
L.Lakshmanan, M.E., Ph.D., , Dr.S.Vigneshwari M.E., Ph.D., Heads of the Department of Computer
science and Engineering for providing me necessary support and details at the right time during the
progressive reviews.
I would like to express my sincere and deep sense of gratitude to my Project Guide Dr. S. Jancy MCA.,
MBA., M.TECH., Ph.D., for her valuable guidance, suggestions and constant encouragement paved way
for the successful completion of my project work.
I wish to express my thanks to all Teaching and Non-teaching staff members of the Department of
Computer science and Engineering who were helpful in many ways for the completion of the project.
iv
ABSTRACT
➢ Due to machine learning progress in biomedical and healthcare
communities, accurate study of medical data benefits early disease
recognition, patient care and community services.
v
CONTENTS
CHAPTER NO. TITLE PAGE NO.
TITLE PAGE i
BONAFIED CERTIFICATE ii
DECLARATION iii
ACKNOWLEGMENT iv
ABSTRACT v
LIST OF FIGURES viii
1. INTRODUCTION 1
1.1 PROBLEM DEFINITION 2
1.2 OBJECTIVES 3
1.2.1 AIM OF THE PROJECT 3
1.2.2 SCOPE OF THE PROJECT 3
2. LITERATURE SURVEY 4
3. EXISTING SYSTEM 8
3.1 DISADVANTGES OF EXISTING SYSTEM 8
4. PROPOSED SYSTEM 9
4.1 ADVANTAGES OF PROPOSED SYSTEM 9
5. PROPOSED ALGORITHM 10
5.1 ARCHITECTURE DIAGRAM 10
6. SYSTEM REQUIREMENTS 11
6.1 HARDWARE REQUIREMENTS 11
6.2 SOFTWARE REQUIREMENTS 11
7. SOFTWARE ENVIRONMENT 12
7.1 Python 12
7.2 History of Python 12
7.3 Python Features 13
7.4 Getting Python 14
vi
7.5 First Python Program 15
8. Python Install 23
9. MODULES 27
10. MODULE DESCRIPTION 27
10.1 Data Collection Module 27
10.2 Preparing the data Module 27
10.3 Training a model 27
10.4 Disease prediction Module 28
11. DATA FLOW DIAGRAM 29
12. ER DIAGRAM 31
13. UML DIAGRAM 32
14. CLASS DIAGRAM 33
15. ACTIVITY DIAGRAM 34
16. SEQUENCE DIAGRAM 35
17. COLLABARATION DIAGRAM 36
18. INPUT DESIGN AND OUTPUT DESIGN 37
18.1 INPUT DESIGN 37
18.2 OBJECTIVES 37
18.3 OUTPUT DESIGN 38
19. SYSTEM STUDY 40
19.1 FEASIBILITY STUDY 40
19.2 SYSTEM TESTING 42
19.2.1 TYPES OF TESTING 42
SOURCE CODE 48
SCREEN SHOTS 60
vii
List of Figures
12.1 ER DIAGRAM 31
viii
1. INTRODUCTION
➢ The Earth is going through a purplish patch of technology where the demand
of intelligence and accuracy is increasing behind it. Today's people are likely
addicted to internet but they are not concerned about their physical health.
➢ People ignore the small problem and don't visit to visit hospital which turn
into serious disease with time. Taking the advantage of this growing
technology, our basis aim is to develop such a system that will predict the
multiple diseases in accordance with symptoms put down by the patients
without visiting the hospitals / physicians.
1
1.1 PROBLEM DEFINITION
The smart health prediction system focused for optimally reducing the healthcare
costs. There are several functionalities remain untouched into health prediction
system. So by living in the edge of technology and still if we are not able to utilize
it in efficient and proper manner then there is no use of it. To tackle this, research
is carried out in health prediction system. There are several applications which use
any one of the technology. This project shows the merging of both technologies to
achieve efficient result.
2
1.2 OBJECTIVES
➢ The proposed system will consider both structured and unstructured data.
➢ To achieve this goal, we develop an approach that allows a user to query for
disease that satisfy a set of conditions based on disease properties, such as
disease indications and also takes into account patient profiles.
3
2 LITERATURE SURVEY
The main objective of this paper is to supply scientific basics for preventing and
forecasting the prevalence of hand, foot and mouth disease to explore the effect of
different meteorological conditions on occurrence of hand, foot and mouth disease
in Wuwei City, northwestern China. Here the data about the diseases and weather
was collected from 2008-2010, and the correlation analysis, multiple linear
regression and exponential curve fitting methods were made. The results showed
4
that 2688 cases of hand, foot and mouth disease were collected from 2008 to 2010,
and the annual average incidence was 47.62/100,000. The average prevalence of
hand, foot and mouth disease at Liangzhou District, Minqin County, Gulang
County and Tianzhu Tibetan Autonomous County were 42.69, 38.52, 65.92 and
49.18 per 100,000 respectively. This disease occurred year-round in Wuwei City,
but had a clear seasonal climax. Generally, the incidence increased from April and
rose to the first peak in May, Jun, July respectively. The second peak was in
September or October every year. Different meteorological factors had different
impact on the epidemic of disease in four areas, such as average temperature,
relative humidity, atmospheric pressure, rainfall and evaporation capacity. The
results of multiple linear regressions indicated that relative humidity and
atmospheric pressure were the main influence factors in Liangzhou District,
average temperature in Gulang County, atmospheric pressure in Tianzhu County.
The incidence of the disease and average sunshine hours showed exponential
function relationship in Minqin County. In conclusion, different weather conditions
have different impact on the prevalence of hand, foot and mouth disease. A high
correlation exists in four areas of Wuwei City between meteorological factors and
hand, foot and mouth disease occurrence. And summer and autumn were the
important seasons to prevent and control the disease.
Spectral data have been widely used to estimate the disease severity levels of
different plants. However, such data have not been evaluated to estimate the
disease stages of the plant. This study aimed at developing a spectral disease index
that is able to identify the stages of wheat leaf rust disease at various DS levels. To
meet the aim of the study, the reflectance spectra of infected leaves with different
5
symptom fractions and DS levels were measured with a spectroradiometer. Then,
pure spectra of the different disease symptoms at the leaf scale were analyzed, and
a new function was developed to find the wavelengths most sensitive to disease
symptom fraction. The reflectance spectra with highest sensitivity were found at
675 and 775 nm. Finally, the normalized difference of DS and the ratio ρ675/ρ775
was used as a new SDI to discriminate three different levels of the disease stage at
the canopy level. The suggested SDI showed a promising performance to improve
the detection disease stages in precision plant protection.
In order to analyze heart valve disease accurately and effectively, a new quantized
diagnosis method was proposed to analyze four clinical heart valve sounds, namely
cardiac sound characteristic waveform.BIOPAC acquiring system was used to
collect signal. The recorded data is transmitted to a computer by ethernet for
storage ǃ ǃanalysis and display in real-time. Analytical model of single degree-of-
freedomwas established to extract characteristic waveform. Furthermore, diagnosis
parameters were calculated to discriminate heart sound of normal and heart valve
disease by easy-understanding graphical representation, so that, even for an
inexperienced user is able to monitor his or her pathology progress easily. Finally,
a case study on a heart valve disease patient before and after surgery is
demonstrated to validate the usefulness and efficiency of the proposed method.
6
Non-Linear Analysis of Heart Rate Variability in Patients with Coronary
Heart Disease
7
3. EXISTING SYSTEM
Machine can predict diseases but cannot predict the sub types of the diseases
caused by occurrence of one disease. It fails to predict all possible conditions of the
people. Existing system handles only structured data. The prediction system are
broad and ambiguous. In current past, countless disease estimate classifications
have been advanced and in procedure. The standing organizations arrange a blend
of machine learning algorithms which are judiciously exact in envisaging diseases.
However the restraint with the prevailing systems are speckled. First, the
prevailing systems are dearer only rich people could pay for to such calculation
systems. And also, when it comes to folks, it becomes even higher. Second, the
guess systems are non-specific and indefinite so far. So that, a machine can
envisage a positive disease but cannot expect the sub types of the diseases and
diseases caused by the existence of one bug. For occurrence, if a group of people
are foreseen with Diabetes, doubtless some of them might have complex risk for
Heart viruses due to the actuality of Diabetes. The remaining schemes fail to
foretell all possible surroundings of the tolerant.
• Less security
8
4. PROPOSED SYSTEM
The Proposed system of multiple disease prediction using machine learning is that
we have used algorithms and all other various tools to build a system which
predicts the disease of the patient using the symptoms and by taking those
symptoms we are comparing with the system‟s dataset that is previously available.
By taking those datasets and comparing with the patient‟s disease we will predict
the accurate percentage disease of the patient. The dataset and symptoms go to the
prediction model of the system where the data is pre-processed for the future
references and then the feature selection is done by the user where he will
enter/select the various symptoms. Then the classification of those data is done
with the help of machine learning algorithms such as Logistic regression. Then the
data goes in the recommendation model, there it shows the risk analysis that is
involved in the system and it also provides the probability estimation of the system
such that it shows the various probability like how the system behaves when there
are n number of predictions are done and it also does the recommendations for the
patients from their final result and also from their symptoms like it can show what
to use and what not to use from the given datasets and the final results. It predicts
probable diseases by mining data sets such as Covid-19, Chronic Kidney disease
and heart Disease. To the best of our knowledge in the area of medical big data
analytics none of the existing work focused on both data types.
9
5. PROPOSED ALGORITHM
• Logistic Regression
10
6. SYSTEM REQUIREMENTS
11
7. SOFTWARE ENVIRONMENT
7.1 Python:
• Python is Interactive − You can actually sit at a Python prompt and interact
with the interpreter directly to write your programs.
Python was developed by Guido van Rossum in the late eighties and early nineties
at the National Research Institute for Mathematics and Computer Science in the
Netherlands.
12
Python is derived from many other languages, including ABC, Modula-3, C, C++,
Algol-68, SmallTalk, and Unix shell and other scripting languages.
Python is copyrighted. Like Perl, Python source code is now available under the
GNU General Public License (GPL).
• Easy-to-read − Python code is more clearly defined and visible to the eyes.
• Portable − Python can run on a wide variety of hardware platforms and has
the same interface on all platforms.
13
• GUI Programming − Python supports GUI applications that can be created
and ported to many system calls, libraries and windows systems, such as
Windows MFC, Macintosh, and the X Window system of Unix.
• Scalable − Python provides a better structure and support for large programs
than shell scripting.
Apart from the above-mentioned features, Python has a big list of good features,
few are listed below −
• It provides very high-level dynamic data types and supports dynamic type
checking.
• It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java.
The most up-to-date and current source code, binaries, documentation, news, etc.,
is available on the official website of Python https://www.python.org.
Windows Installation
14
• Follow the link for the Windows installer python-XYZ.msifile where XYZ
is the version you need to install.
• Run the downloaded file. This brings up the Python install wizard, which is
really easy to use. Just accept the default settings, wait until the install is
finished, and you are done.
The Python language has many similarities to Perl, C, and Java. However, there
are some definite differences between the languages.
$ python
Python2.4.3(#1,Nov112010,13:34:43)
>>>
Type the following text at the Python prompt and press the Enter −
15
>>>print"Hello, Python!"
If you are running new version of Python, then you would need to use print
statement with parenthesis as in print ("Hello, Python!");. However in Python
version 2.4.3, this produces the following result −
Hello, Python!
Invoking the interpreter with a script parameter begins execution of the script and
continues until the script is finished. When the script is finished, the interpreter is
no longer active.
Let us write a simple Python program in a script. Python files have extension .py.
Type the following source code in a test.py file −
print"Hello, Python!"
We assume that you have Python interpreter set in PATH variable. Now, try to
run this program as follows −
$ python test.py
Hello, Python!
Flask Framework:
16
Flask is a web application framework written in Python. Armin Ronacher,
who leads an international group of Python enthusiasts named Pocco, develops it.
Flask is based on Werkzeug WSGI toolkit and Jinja2 template engine. Both are
Pocco projects.
1 GET
2 HEAD
3 POST
4 PUT
17
5 DELETE
By default, the Flask route responds to the GET requests. However, this
preference can be altered by providing methods argument to route() decorator.
In order to demonstrate the use of POST method in URL routing, first let us
create an HTML form and use the POST method to send form data to a URL.
<html>
<body>
<formaction="http://localhost:5000/login"method="post">
<p>Enter Name:</p>
<p><inputtype="text"name="nm"/></p>
<p><inputtype="submit"value="submit"/></p>
</form>
</body>
</html>
18
app=Flask( name )
@app.route('/success/<name>')
def success(name):
@app.route('/login',methods=['POST','GET'])
def login():
ifrequest.method=='POST':
user=request.form['nm']
else:
user=request.args.get('nm')
app.run(debug =True)
After the development server starts running, open login.html in the browser, enter
name in the text field and click Submit.
19
Form data is POSTed to the URL in action clause of form tag.
user = request.form['nm']
It is passed to „/success‟ URL as variable part. The browser displays
a welcome message in the window.
20
Change the method parameter to „GET‟ in login.html and open it again in the
browser. The data received on server is by the GET method. The value of „nm‟
parameter is now obtained by −
User = request.args.get(„nm‟)
Here, args is dictionary object containing a list of pairs of form parameter and its
corresponding value. The value corresponding to „nm‟ parameter is passed on to
„/success‟ URL as before.
21
What is Python?
Python is a popular programming language. It was created in 1991 by Guido van
Rossum.
It is used for:
• web development (server-side),
• software development,
• mathematics,
• system scripting.
What can Python do?
• Python can be used on a server to create web applications.
• Python can be used alongside software to create workflows.
• Python can connect to database systems. It can also read and modify files.
• Python can be used to handle big data and perform complex mathematics.
• Python can be used for rapid prototyping, or for production-ready software
development.
Why Python?
• Python works on different platforms (Windows, Mac, Linux, Raspberry Pi,
etc).
• Python has a simple syntax similar to the English language.
• Python has syntax that allows developers to write programs with fewer lines
than some other programming languages.
• Python runs on an interpreter system, meaning that code can be executed as
soon as it is written. This means that prototyping can be very quick.
• Python can be treated in a procedural way, an object-orientated way or a
functional way.
Good to know
22
• The most recent major version of Python is Python 3, which we shall be
using in this tutorial. However, Python 2, although not being updated with
anything other than security updates, is still quite popular.
• In this tutorial Python will be written in a text editor. It is possible to write
Python in an Integrated Development Environment, such as Thonny,
Pycharm, Netbeans or Eclipse which are particularly useful when managing
larger collections of Python files.
Python Syntax compared to other programming languages
• Python was designed to for readability, and has some similarities to the
English language with influence from mathematics.
• Python uses new lines to complete a command, as opposed to other
programming languages which often use semicolons or parentheses.
• Python relies on indentation, using whitespace, to define scope; such as the
scope of loops, functions and classes. Other programming languages often
use curly-brackets for this purpose.
8. Python Install
Many PCs and Macs will have python already installed.
To check if you have python installed on a Windows PC, search in the start bar
for Python or run the following on the Command Line (cmd.exe):
To check if you have python installed on a Linux or Mac, then on linux open the
command line or on Mac open the Terminal and type:
python --version
If you find that you do not have python installed on your computer, then you
can download it for free from the following website: https://www.python.org/
23
Python Quickstart
Python is an interpreted programming language, this means that as a developer
you write Python (.py) files in a text editor and then put those files into the
python interpreter to be executed.
The way to run a python file is like this on the command line:
Let's write our first Python file, called helloworld.py, which can be done in any
text editor.
helloworld.py
print("Hello, World!")
Simple as that. Save your file. Open your command line, navigate to the
directory where you saved your file, and run:
Hello, World!
Congratulations, you have written and executed your first Python program.
C:\Users\Your Name>python
24
From there you can write any python, including our hello world example from
earlier in the tutorial:
C:\Users\Your Name>python
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print("Hello, World!")
C:\Users\Your Name>python
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print("Hello, World!")
Hello, World!
Whenever you are done in the python command line, you can simply type the
following to quit the python command line interface:
exit()
Python Indentations
Where in other programming languages the indentation in code is for readability
only, in Python the indentation is very important.
Python uses indentation to indicate a block of code.
Example
25
if 5 > 2:
print("Five is greater than two!")
Python will give you an error if you skip the indentation:
Example
if 5 > 2:
print("Five is greater than two!")
Comments
Python has commenting capability for the purpose of in-code documentation.
Comments start with a #, and Python will render the rest of the line as a comment:
Example
Comments in Python:
#This is a comment.
print("Hello, World!")
Docstrings
Python also has extended documentation capability, called docstrings.
Docstrings can be one line, or multiline.
Python uses triple quotes at the beginning and end of the docstring:
Example
Docstrings are also comments:
"""This is a
multiline docstring."""
print("Hello, World!")
26
9. MODULES
➢ Training a model
Be it the raw data from excel, access, text files etc., this step (gathering past data)
forms the foundation of the future learning. The better the variety, density and
volume of relevant data, better the learning prospects for the machine becomes.
Any analytical process thrives on the quality of the data used. One needs to spend
time determining the quality of data and then taking steps for fixing issues such as
missing data and treatment of outliers. Exploratory analysis is perhaps one method
to study the nuances of the data in details thereby burgeoning the nutritional
content.
This step involves choosing the appropriate algorithm and representation of data in
the form of the model. The cleaned data is split into two parts – train and test
27
(proportion depending on the prerequisites); the first part (training data) is used for
developing the model. The second part (test data), is used as a reference.
Patient will specify the symptoms caused due to his illness. System will ask certain
question regarding his illness and system predict the disease based on the
symptoms specified by the patient.
28
11. DATA FLOW DIAGRAM:
29
Fig 11.1- Data flow Diagram
30
12. ER- DIAGRAM
31
13. UML DIAGRAM
UML is a method for describing the system architecture in detail using the
blueprint. UML represents a collection of best engineering practices that have
proven successful in the modeling of large and complex systems. UML is a very
important part of developing objects oriented software and the software
development process. UML uses mostly graphical notations to express the design
of software projects. Using the UML helps project teams communicate, explore
potential designs, and validate the architectural design of the software.
User Registration
Sever Deployment
Gives symptoms
User
Server
Analysis of Questionaries
Disease Anlaysis
32
14. CLASS DIAGRAM
Class diagrams are widely used to describe the types of objects in a system and
their relationships. Class diagrams model class structure and contents using design
elements such as classes, packages and objects. Class diagrams describe three
different perspectives when designing a system, conceptual, specification, and
implementation. These perspectives become evident as the diagram is created and
help solidify the design. Class diagrams are arguably the most used UML diagram
type. It is the main building block of any object oriented solution. It shows the
classes in a system, attributes and operations of each class and the relationship
between each class. In most modeling tools a class has three parts, name at the top,
attributes in the middle and operations or methods at the bottom. In large systems
with many classes related classes are grouped together to create class diagrams.
Different relationships between diagrams are show by different types of Arrows.
Below is a image of a class diagram. Follow the link for more class diagram
examples.
33
15. ACTIVITY DIAGRAM
Login
Disease
Server
Analysis of Patient
Health Condition
Formulation
Questions
Evidence
Gathering
Resultant
Output
34
16. SEQUENCE DIAGRAM
Sequence diagrams in UML shows how object interact with each other and the
order those interactions occur. It‟s important to note that they show the interactions
for a particular scenario. The processes are represented vertically and interactions
are show as arrows. This article explains the purpose and the basics of Sequence
diagrams.
2: Creating of Network
3: Gives symptoms
5: analysis disease
6: Response to user
7: Best drug
8: Recommend the best doctor based on user feed back and fix appoinment
35
17. COLLABORATION DIAGRAM
1: User Registration
User Server
Deployment
3: Gives symptoms
6: Response to user
7: Best drug
Analysis
5: analysis disease
2: Creating of Network
Analysis Of
Patient Health
Analysis Of 8: Recommend the best doctor based on user feed back and fix appoinment
Question
4: check patient health
36
18. INPUT DESIGN AND OUTPUT DESIGN
The input design is the link between the information system and the user. It
comprises the developing specification and procedures for data preparation and
those steps are necessary to put transaction data in to a usable form for processing
can be achieved by inspecting the computer to read data from a written or printed
document or it can occur by having people keying the data directly into the system.
The design of input focuses on controlling the amount of input required,
controlling the errors, avoiding delay, avoiding extra steps and keeping the process
simple. The input is designed in such a way so that it provides security and ease of
use with retaining the privacy. Input Design considered the following things:
18.2 OBJECTIVES
37
input process and show the correct direction to the management for getting correct
information from the computerized system.
2. It is achieved by creating user-friendly screens for the data entry to handle large
volume of data. The goal of designing input is to make data entry easier and to be
free from errors. The data entry screen is designed in such a way that all the data
manipulates can be performed. It also provides record viewing facilities.
3. When the data is entered it will check for its validity. Data can be entered with
the help of screens. Appropriate messages are provided as when needed so that the
user will not be in maize of instant. Thus the objective of input design is to create
an input layout that is easy to follow
A quality output is one, which meets the requirements of the end user and presents
the information clearly. In any system results of processing are communicated to
the users and to other system through outputs. In output design it is determined
how the information is to be displaced for immediate need and also the hard copy
output. It is the most important and direct source information to the user. Efficient
and intelligent output design improves the system‟s relationship to help user
decision-making.
38
effectively. When analysis design computer output, they should Identify the
specific output that is needed to meet the requirements.
The output form of an information system should accomplish one or more of the
following objectives.
39
19. SYSTEM STUDY
ECONOMICAL FEASIBILITY
TECHNICAL FEASIBILITY
SOCIAL FEASIBILITY
ECONOMICAL FEASIBILITY
40
This study is carried out to check the economic impact that the system will
have on the organization. The amount of fund that the company can pour into the
research and development of the system is limited. The expenditures must be
justified. Thus the developed system as well within the budget and this was
achieved because most of the technologies used are freely available. Only the
customized products had to be purchased.
TECHNICAL FEASIBILITY
This study is carried out to check the technical feasibility, that is, the
technical requirements of the system. Any system developed must not have a high
demand on the available technical resources. This will lead to high demands on the
available technical resources. This will lead to high demands being placed on the
client. The developed system must have a modest requirement, as only minimal or
null changes are required for implementing this system.
SOCIAL FEASIBILITY
The aspect of study is to check the level of acceptance of the system by the
user. This includes the process of training the user to use the system efficiently.
The user must not feel threatened by the system, instead must accept it as a
necessity. The level of acceptance by the users solely depends on the methods that
are employed to educate the user about the system and to make him familiar with
it. His level of confidence must be raised so that he is also able to make some
constructive criticism, which is welcomed, as he is the final user of the system.
41
19.2 SYSTEM TESTING
Software system meets its requirements and user expectations and does not fail in
an unacceptable manner. There are various types of test. Each test type addresses a
specific testing requirement.
Unit testing
Unit testing involves the design of test cases that validate that the internal
program logic is functioning properly, and that program inputs produce valid
outputs. All decision branches and internal code flow should be validated. It is the
testing of individual software units of the application .it is done after the
completion of an individual unit before integration. This is a structural testing, that
relies on knowledge of its construction and is invasive. Unit tests perform basic
tests at component level and test a specific business process, application, and/or
system configuration. Unit tests ensure that each unique path of a business process
42
performs accurately to the documented specifications and contains clearly defined
inputs and expected results.
Integration testing
Functional test
43
Invalid Input : identified classes of invalid input must be rejected.
System Test
System testing ensures that the entire integrated software system meets
requirements. It tests a configuration to ensure known and predictable results. An
example of system testing is the configuration oriented system integration test.
System testing is based on process descriptions and flows, emphasizing pre-driven
process links and integration points.
44
Black Box Testing
Black Box Testing is testing the software without any knowledge of the inner
workings, structure or language of the module being tested. Black box tests, as
most other kinds of tests, must be written from a definitive source document, such
as specification or requirements document, such as specification or requirements
document. It is a testing in which the software under test is treated, as a black box
.you cannot “see” into it. The test provides inputs and responds to outputs without
considering how the software works.
Unit Testing:
Unit testing is usually conducted as part of a combined code and unit test
phase of the software lifecycle, although it is not uncommon for coding and unit
testing to be conducted as two distinct phases.
Test objectives
• All field entries must work properly.
• Pages must be activated from the identified link.
• The entry screen, messages and responses must not be delayed.
45
Features to be tested
• Verify that the entries are of the correct format
• No duplicate entries should be allowed
• All links should take the user to the correct page.
Integration Testing
Test Results: All the test cases mentioned above passed successfully. No defects
encountered.
46
Acceptance Testing
Test Results: All the test cases mentioned above passed successfully. No defects
encountered.
47
SOURCE CODE
from flask import Flask, render_template, request, url_for, send_file, flash,
redirect, make_response
import pickle
import numpy as np
import os
import json
import termcolor
import smtplib
import CurrentStats
# import CancerModel
# import PdfConverter
# from PdfConverter import PDFPageCountError
import DiseasePred
# import warnings
# For Coronavirus
with open("Coronavirus_logistic", "rb") as f:
logisticRegression = pickle.load(f)
@app.route("/")
@app.route("/home")
def Homepage():
# cases, cured, death = CurrentStats.currentStatus()
return render_template("Homepage.html", feedback="False")
@app.errorhandler(404)
def page_not_found(e):
return render_template("PageNotFound.html")
@app.route("/about")
def About():
return render_template("About.html")
print(content)
try:
with smtplib.SMTP("smtp.gmail.com", 587) as mail:
mail.ehlo()
mail.starttls()
mail.login(sender, password)
mail.ehlo()
mail.sendmail(sender, receiver, content)
51
except:
pass
return render_template("Contact.html")
@app.route("/infected")
def Infected():
return render_template("Infected.htm", disease="Nothing")
@app.route("/noninfected")
def NonInfected():
return render_template("NonInfected.htm")
@app.route("/download")
def Download():
file = "static/Example.docx"
return send_file(file, as_attachment=True)
if prediction:
return render_template("Infected.htm", disease="Heart Disease")
else:
return render_template("NonInfected.htm")
def predicts(inputs):
header = ['bloody_stools', 'fecal_leakage', 'swelling', 'dizziness', 'confusion',
'fatigue', 'itching', 'vomiting', 'arm_pain',
'cough', 'muscle_pain', 'depression', 'fever',
'painful_bowel_moments', 'urine_blood', 'sweating', 'nausea',
'stiff_neck', 'decreased_appetite', 'weak', 'wheezing', 'bleeding',
'hives', 'bleed', 'headache', 'dry_mouth', 'sweat',
'stomach_pain', 'stool_pressure', 'anxiety', 'shoulder_pain',
'anus_itching', 'vision_problem', 'abdominal_pain',
'chest_pain', 'weight_loss', 'diarrhea', 'breath_problems', 'thirsty',
'anus_swelling', 'blood_o_tissue', 'constipation',
57
'neck_pain', 'low_heartbeat', 'more_urine', 'low_breath',
'muscle_cramps', 'muscle_spasm', 'yawning', 'rash', 'back_pain',
'anal_bleeding', 'lump_anus', 'cold', 'skin_rash', 'neck_stiff']
df = pd.read_csv("Disease_Symptoms.csv")
disease = set(df.iloc[:, 0])
disease = list(disease)
disease.sort()
model_inputs5 = []
for x in range(0, len(header)):
model_inputs5.append(0)
# print(inputs)
pred = Model_Decision_Tree.predict([model_inputs5])
58
print(disease[pred[0]])
return disease[pred[0]]
59
SCREENSHOTS
Home Page
60
Covid-19 Detector
Safe Zone
61
Danger Zone
62
Multiple Disease Prediction Page
63
64
Pneumonia
65
66
Chronic Kidney Disease Detection Page
Danger Zone
67
Safe Zone
68
Heart Disease Detection Page
Safe Zone
69
70
About Page
71
Danger Zone
72
CONCLUSION
➢ This paper gives research of multiple researches done in this field. Our
Proposed System aims at bridging gap between Doctors and Patients which
will help both classes of users in achieving their goals.
➢ This system provides support for multiple disease prediction using different
Machine Learning algorithms.
➢ The present approach of many systems focuses only on automating this
process which lacks in building the user‟s trust in the system.
➢ By providing Doctor‟s recommendation in our system, we ensure user‟s trust
side by side ensuring that the Doctor‟s will not feel that their Business is
getting affected due to this System.
73
REFERENCES
74
➢ N Chaithra and B Madhu, "Classification Models on Cardiovascular Disease
Prediction using Data Mining Techniques", Journal of Cardiovascular
Diseases & Diagnosis, vol. 6, pp. 1-4, 2018.
75