1822 B.E Cse Batchno 188
1822 B.E Cse Batchno 188
By
ONTEDDU MANASA(Reg.No.38110375)
PASUPULETI ANKITA NAGA SAI SWATHI(Reg.No.38110391)
SATHYABAMA
INSTITUTE OF SCIENCE AND TECHNOLOGY
(DEEMED TO BE UNIVERSITY)Accredited with Grade “A” by NAAC
JEPPIAAR NAGAR, RAJIV GANDHI SALAI, CHENNAI – 600 119
MARCH - 2022
SATHYABAMA
INSTITUTE OF SCIENCE AND TECHNOLOGY
(DEEMED TO BE UNIVERSITY)
Accredited with “A” grade 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 bonafied work of ONTEDDU
MANASA(Reg.No.38110375) and PASUPULETI ANKITA NAGA SAI
SWATHI(Reg.No.38110391) who carried out the project entitled “Disease Prediction And
Hospital Recommendation Using Machine Learning” under my supervision from
August 2021 to March 2022.
Internal Guide
I ONTEDDU MANASA and PASUPULETI ANKITA NAGA SAI SWATHI hereby declare
that the Project Report entitled “Disease Prediction And Hospital Recommendation
Using Machine Learning” is done by me under the guidance of Dr. M. SUGANIYA,
M.E.,P.h.D Department of Computer Science and Engineering at Sathyabama Institute
of Science and Technology is submitted in partial fulfillment of the requirements for the
award of Bachelor of Engineering degree in Computer Science and Engineering.
DATE:
I convey my thanks to Dr. T. Sasikala, M.E., Ph.D., Dean, School of Computing, Dr. S.
Vigneswari, M.E., Ph.D., and Dr. L. Lakshmanan, 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. M.
SUGANIYA, M.E., P.h.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.
ABSTRACT
2. LITERATURE SURVEY 11
2.1 Analysis of literature 11
2.2 Literary review 12
3. SYSTEM ANALYSIS 15
3.1 Existing System 15
3.2 Proposed System 15
3.3 System Architecture 16
3.4 System Requirement 17
3.5 Software Description 17
3.5.1 Applications of python 18
3.5.2 Features of python 18
4. SYSTEM IMPLEMENTATION 19
4.1 User Module 19
4.1.1 Login Module 19
4.1.2 Registration Module 19
4.2 Administration Module 20
4.2.1 Add and update hospital information 20
4.2.2 View feedback 20
4.3 Disease Prediction Module 20
4.4 Hospital Recommendation Module 20
5. SOFTWARE TESTING 21
5.1 General 22
5.2 Test Driven Development 23
5.3 Unit Testing 23
5.4 Black Box Testing 24
5.5 Integration Testing 24
5.6 System Testing 25
5.7 Regression Testing 26
1.1 OVERVIEW
1. Supervised Learning
2. Unsupervised Learning
3. Reinforcement Learning
SUPERVISED LEARNING
This function takes input in four dimensions and has a variety of polynomial
terms. Deriving a normal equation for this function is a significant challenge. Many
modern machine learning problems take thousands or even millions of dimensions of
data to build predictions using hundreds of coefficients. Predicting how an organism’s
genome will be expressed, or what the climate will be like in fifty years, are examples of
such complex problems.
Under supervised ML, two major subcategories are:
● Regression machine learning systems: Systems where the value being
predicted falls somewhere on a continuous spectrum.
● Classification machine learning systems: Systems where we seek a yes-or-no
prediction.
In practice, x almost always represents multiple data points. So, for example, a housing
price predictor might take not only square-footage (x1) but also number of bedrooms
(x2), number of bathrooms (x3), number of floors (x4), year built (x5), zip code (x6), and
so forth. Determining which inputs to use is an important part of ML design. However,
for the sake of explanation, it is easiest to assume a single input value is used.
Regression algorithms are used if there is a relationship between the input variable
and the output variable. It is used for the prediction of continuous variables, such as
Weather forecasting, Market Trends, etc.
1. Linear Regression
2. Regression Trees
3. Non-Linear Regression
4. Bayesian Linear Regression
5. Polynomial Regression
CLASSIFICATION
Classification algorithms are used when the output variable is categorical, which
means there are two classes such as Yes-No, Male-Female, True-false, etc.
Spam Filtering,
● Random Forest
● Decision Tree
● Logistic Regression
● Support vector Machines
● Decision Tree is a supervised learning technique that can be used for both
classification and Regression problems, but mostly it is preferred for solving
Classification problems. It is a tree-structured classifier, where internal nodes
represent the features of a dataset, branches represent the decision rules and
each leaf node represents the outcome.
● In a Decision tree, there are two nodes, which are the Decision Node and Leaf
Node. Decision nodes are used to make any decision and have multiple
branches, whereas Leaf nodes are the output of those decisions and do not
contain any further branches.
● The decisions or the test are performed on the basis of features of the given
dataset.
● It is a graphical representation for getting all the possible solutions to a
problem/decision based on given conditions.
● It is called a decision tree because, similar to a tree, it starts with the root node,
which expands on further branches and constructs a tree-like structure.
● In order to build a tree, we use the CART algorithm, which stands for
Classification and Regression Tree algorithm.
● A decision tree simply asks a question, and based on the answer (Yes/No), it
further split the tree into sub trees.
● Below diagram explains the general structure of a decision tree:
There are various algorithms in Machine learning, so choosing the best algorithm for the
given dataset and problem is the main point to remember while creating a machine
learning model. Below are the two reasons for using the Decision tree:
● Decision Trees usually mimic human thinking ability while making a decision, so it
is easy to understand.
● The logic behind the decision tree can be easily understood because it shows a
tree-like structure.
In a decision tree, for predicting the class of the given dataset, the algorithm starts
from the root node of the tree. This algorithm compares the values of root attribute with
the record (real dataset) attribute and, based on the comparison, follows the branch and
jumps to the next node.
For the next node, the algorithm again compares the attribute value with the other
sub-nodes and move further. It continues the process until it reaches the leaf node of the
tree
Advantages of the Decision Tree
● It is simple to understand as it follows the same process which a human follow
while making any decision in real-life.
● It can be very useful for solving decision-related problems.
● It helps to think about all the possible outcomes for a problem.
● There is less requirement of data cleaning compared to other algorithms.
● For more class labels, the computational complexity of the decision tree may
increase.
Random forest algorithm can use both for classification and the regression kind of
problems. In this you are going to learn, how the random forest algorithm works in
machine learning for the classification task.
Random Forest is a popular machine learning algorithm that belongs to the
supervised learning technique. It can be used for both Classification and Regression
problems in ML. It is based on the concept of ensemble learning, which is a process of
combining multiple classifiers to solve a complex problem and to improve the
performance of the model.
A random forest algorithm consists of many decision trees. The ‘forest’ generated by
the random forest algorithm is trained through bagging or bootstrap aggregating.
Bagging is an ensemble meta-algorithm that improves the accuracy of machine learning
algorithms.
As the name suggests, "Random Forest is a classifier that contains a number of
decision trees on various subsets of the given dataset and takes the average to improve
the predictive accuracy of that dataset." Instead of relying on one decision tree, the
random forest takes the prediction from each tree and based on the majority votes of
predictions, and it predicts the final output.
The below diagram explains the working of the Random Forest algorithm:
Below are some points that explain why we should use the Random Forest algorithm:
● It takes less training time as compared to other algorithms.
● It predicts output with high accuracy, even for the large dataset it runs efficiently.
● It can also maintain accuracy when a large proportion of data is missing.
Features of a Random Forest Algorithm
● Although random forest can be used for both classification and regression tasks,
it is not more suitable for Regression tasks.
CHAPTER 2
LITERATURE SURVEY
Yuji Mizuno et al. described a new load prediction method and management of
distributed power system in island mode of a large hospital. The purpose of this paper is
to analysis a frequency stability of a large hospital grid for a combination of emergency
generators (EGs) with a photovoltaic power generation (PV). A system frequency of the
grid can be controlled by a droop controller of emergency generator system when the
system has installed only one EG without PV system. When the PV system will install on
the grid, the emergency generator system should be distributed to some generators of
small type. It is reason why the power balance cannot keep the stabilize of the system
frequency within all of power range due to too large EG. Since distributed generation
system need a demand for each generator, it is important to predict a load. This paper
presents a new load prediction method and management for stabilization with island
mode in the large hospital power grid. It is clarified that the deviation of the system
frequency has improved a stabilization using the proposed prediction method.
Mohammad Reza et al. This article is about Hospital Recommendation System based
on patient satisfaction survey. Surveys are used by hospitals to evaluate patient
satisfaction and to improve general hospital operations. Collected satisfaction data is
usually represented to the hospital administration by using statistical charts and graphs.
Although such visualization is helpful, typically no deeper data analysis is performed to
identify important factors which contribute to patient satisfaction. This work presents an
unsupervised data-driven methodology for analyzing patient satisfaction survey data.
The goal of the proposed exploratory data analysis is to identify patient communities
with similar satisfaction levels and the major factors, which contribute to their
satisfaction. This type of data analysis will help hospitals to pinpoint the prevalence of
certain satisfaction factors in specific patient communities or clusters of individuals and
to implement more proactive measures to improve patient experience and care.
Z. Yao and Y. Fu states a temporal matching between poi popularity and user regularity,
in 2016.Navigation is the most common way of deciding to know a choice, gathering
data, and assessing different arrangements. Point of interest (POI) recommendation,
which provides personalized recommendation of places to mobile users, is an important
task in location-based social networks (LBSNs). However, quite different from traditional
interest-oriented merchandise recommendation, POI recommendation is more complex
due to the timing effects: we need to examine whether the POI fits a user's availability.
While there are some prior studies which included the temporal effect into POI
recommendations, they overlooked the compatibility between time-varying popularity of
POIs and regular availability of users, which we believe has a non-negligible impact on
user decision-making. To this end, in this paper, we present a novel method which
incorporates the degree of temporal matching between users and POIs into
personalized POI recommendations. Specifically, we first profile the temporal popularity
of POIs to show when a POI is popular for visit by mining the spatio-temporal human
mobility and POI category data. Secondly, we propose latent user regularities to
characterize when a user is regularly available for exploring POIs, which is learned with
a user-POI temporal matching function. Finally, results of extensive experiments with
real-world POI check-in and human mobility data demonstrate that our proposed
user-POI temporal matching method delivers substantial advantages over baseline
models for POI recommendation tasks.
Min Chen described about disease prediction by Machine Learning over big data from
Healthcare Communities.With big data growth in biomedical and healthcare
communities, accurate analysis of medical data benefits early disease detection, patient
care, and community services. However, the analysis accuracy is reduced when the
quality of medical data is incomplete. Moreover, different regions exhibit unique
characteristics of certain regional diseases, which may weaken the prediction of disease
outbreaks. In this paper, we streamline machine learning algorithms for effective
prediction of chronic disease outbreak in disease-frequent communities. We experiment
the modified prediction models over real-life hospital data collected from central China in
2013-2015. To overcome the difficulty of incomplete data, we use a latent factor model
to reconstruct the missing data. We experiment on a regional chronic disease of cerebral
infarction. We propose a new convolutional neural network (CNN)-based multimodal
disease risk prediction algorithm using structured and unstructured data from hospital.
To the best of our knowledge, none of the existing work focused on both data types in
the area of medical big data analytics. Compared with several typical prediction
algorithms, the prediction accuracy of our proposed algorithm reaches 94.8% with a
convergence speed, which is faster than that of the CNN-based uni modal disease risk
prediction algorithm.
Bo Hu and Martin Ester suggests social topic modelling for point of interest
recommendation in location based social networks. In this paper, we address the
problem of recommending Point-of-Interests (POIs) to users in a location-based social
network. To the best of our knowledge, we are the first to propose the ST (Social Topic)
model capturing both the social and topic aspects of user check-ins. We conduct
experiments on real life data sets from Foursquare and Yelp. We evaluate the
effectiveness of ST by evaluating the accuracy of top-k POI recommendation. The
experimental results show that ST achieves better performance than the state-of-the-art
models in the areas of social network-based recommender systems, and exploits the
power of the location-based social network that has never been utilized before.
CHAPTER 3
SYSTEM ANALYSIS
3.1 EXISTING SYSTEM
Hospital currently use a manual system for the management and maintenance of
critical information the current system requires numerous paper form with data stores
spread through the hospital infrastructure often information’s incomplete or does not
follow recommendation standards form are often are lost in transmit between
department requiring a comprehensive auditing process to ensure that no vital
information is lost multiple copies of the same information exists in the hosptial and may
lead to inconsistence in data in various data stores here we have to developed the
hospital recommendation and we apply the proposed model to 113 hospitals , and
constructed an online hospital recommendation system which can provide users with a
hospital rank list basing the real-time population density information and the hospitals’
basic information such as hospitals’ levels and their distances
It describes the overall features of the software is concerned with defining the
requirements and establishing the high level of the system. During architectural design,
the various web pages and their interconnections are identified and designed. The major
software components are identified and decomposed into processing modules and
conceptual data structures and the interconnections among the modules are identified.
The following modules are identified in the proposed system.
HARDWARE REQUIREMENTS
System : Pentium i3 Processor
Hard Disk : 500 GB.
Monitor : 15’’ LED
Input Devices : Keyboard, Mouse
Ram : 2 GB
SOFTWARE REQUIREMENTS
Operating system : Windows 10
Coding Language : Python
In addition, Python is the most popular language for machine learning and
deep learning. As a matter of fact, today, all top organizations are investing in Python
to implement machine learning in the back-end.
Python is a general-purpose interpreted, interactive, object-oriented, and high-level
programming language. It was created by Guido van Rossum during 1985- 1990. Like
Perl, Python source code is also available under the GNU General Public License
(GPL).It 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.
Python is derived from many other languages, including ABC, Modula-3, C, C++,
Algol-68, SmallTalk, and Unix shell and other scripting languages.It is copyrighted. Like
Perl, Python source code is now available under the GNU General Public License
(GPL).It is now maintained by a core development team at the institute, although Guido
van Rossum still holds a vital role in directing its progress.
● Easy-to-read − Python code is more clearly defined and visible to the eyes.
● A broad standard library − Python's bulk of the library is very portable and
cross-platform compatible on UNIX, Windows, and Macintosh.
● Interactive Mode − Python has support for an interactive mode which allows
interactive testing and debugging of snippets of code.
● Portable − Python can run on a wide variety of hardware platforms and has the
same interface on all platforms.
● Extendable − You can add low-level modules to the Python interpreter. These
modules enable programmers to add to or customize their tools to be more
efficient.
● 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.
SYSTEM IMPLEMENTATION
LIST OF MODULES
● User Module
● Administration Module
● Disease prediction Module
● Hospital Recommendation Module
CHAPTER 5
SOFTWARE TESTING
The test scenario is a detailed document of test cases that cover end to end
functionality of a software application in liner statements. The liner statement is
considered as a scenario. The test scenario is a high-level classification of testable
requirements. These requirements are grouped on the basis of the functionality of a
module and obtained from the use cases. In the test scenario, there is a detailed
testing process due to many associated test cases. Before performing the test
scenario, the tester has to consider the test cases for each scenario.
Documentation testing can start at the very beginning of the software process
and hence save large amounts of money, since the earlier a defect is found the less it
will cost to be fixed. The most popular testing documentation files are test reports,
plans, and checklists. These documents are used to outline the team’s workload and
keep track of the process. Let’s take a look at the key requirements for these files and
see how they contribute to the process. Test strategy. An outline of the full approach
to product testing. As the project moves along, developers, designers, product owners
can come back to the document and see if the actual performance corresponds to the
planned activities.
Test data. The data that testers enter into the software to verify certain features
and their outputs. Examples of such data can be fake user profiles, statistics, media
content, similar to files that would be uploaded by an end-user in a ready solution.
Test scenarios. In scenarios, testers break down the product’s functionality and
interface by modules and provide real-time status updates at all testing stages. A
module can be described by a single statement, or require hundreds of statuses,
depending on its size and scope.
● Testing can be done in the early phases of the software development lifecycle
when other modules may not be available for integration
● Fixing an issue in Unit Testing can fix many other issues occurring in later
development and testing stages
● Cost of fixing a defect found in Unit Testing is very less than the one found in
the system or acceptance testing
5.1 GENERAL
Unit Testing frameworks are mostly used to help write unit tests quickly and
easily. Most of the programming languages do not support unit testing with the inbuilt
compiler. Third-party open source and commercial tools can be used to make unit
testing even more fun.
Functional Testing is a type of black box testing whereby each part of the
system is tested against functional specification/requirements. For instance, seek
answers to the following questions,
Black Box testers don't care about Unit Testing. Their main goal is to validate
the application against the requirements without going into the implementation details.
Unit Testing is not a new concept. It's been there since the early days of
programming. Usually, developers and sometimes White box testers write Unit tests
to improve code quality by verifying each and every unit of the code used to
implement functional requirements (aka test drove development TDD or test-first
development). Most of us might know the classic definition of Unit Testing – “Unit
Testing is the method of verifying the smallest piece of testable code against its
purpose.” If the purpose or requirement failed then the unit test has failed.
In simple words, Unit Testing means – writing a piece of code (unit test) to verify the
code (unit) written for implementing requirements.
As often with these things, it's best to start with a bit of history. When I first
learned about integration testing, it was in the 1980's and the waterfall was the
dominant influence of software development thinking. In a larger project, we would
have a design phase that would specify the interface and behavior of the various
modules in the system. Modules would then be assigned to developers to program. It
was not unusual for one programmer to be responsible for a single module, but this
would be big enough that it could take months to build it. All this work was done in
isolation, and when the programmer believed it was finished they would hand it over
to QA for testing.
Fig 5.1 Integration Testing
5.6 SYSTEM TESTING
It's comes under black box testing i.e. only external working features of the
software are evaluated during this testing. It does not requires any internal
knowledge of the coding, programming, design, etc., and is completely based on
users-perspective.
A black box testing type, system testing is the first testing technique that
carries out the task of testing a software product as a whole. This System testing tests
the integrated system and validates whether it meets the specified requirements of
the client.
System testing is a process of testing the entire system that is fully functional,
in order to ensure the system is bound to all the requirements provided by the client in
the form of the functional specification or system specification documentation. In most
cases, it is done next to the Integration testing, as this testing should be covering the
end-to-end system’s actual routine. This type of testing requires a dedicated Test Plan
and other test documentation derived from the system specification document that
should cover both software and hardware requirements. By this test, we uncover the
errors. It ensures that all the system works as expected. We check System
performance and functionality to get a quality product. System testing is nothing but
testing the system as a whole. This testing checks complete end-to-end scenario as
per the customer’s point of view. Functional and Non-Functional tests also done by
System testing. All things are done to maintain trust within the development that the
system is defect-free and bug-free. System testing is also intended to test
hardware/software requirements specifications. System testing is more of a limited
type of testing; it seeks to detect both defects within the “inter-assemblages”.
Load testing is perform to make sure that what amount of load can be
withstand the application under test. The successfully executed load testing is only if
the specified test cases are executed without any error in allocated time.
CHAPTER 6
Figure-6.1 Homepage
The Figure-6.2 gives information of a page to fill the details and symptoms of
patient like temperature, cough, cold, sore throat etc.
Figure-6.2 Webpage for details
The Figure-6.3 shows the analysis of patient symptoms and gives the patient
condition is safe if the patient is tested as negative
The Figure-6.4 shows the analysis of patient symptoms and gives the patient
condition is danger if the patient tested as positive also provide some of the best
hospitals.
Figure-6.4 Danger zone
Figure-6.5 tells about the medical condition prediction page for filling the
information and multiple symptoms of patient for any disease
The Figure-6.8 shows the analysis of patient is suffering from kidney disease or
not based on the given symptoms.
Fig 6.8-Detecting Safe
The Figure-6.9 shows the page for filling the details like blood pressure,
glucose, cholesterol regarding Heart disease.
The Figure-6.10 shows the analysis of patient is suffering from Heart disease or
not and provide best hospitals to cure the disease.
Fig-6.10 Detecting Danger
CHAPTER 7
7.1 Conclusion
We presented a novel approach for hospital population density estimation
based on Symptoms and Disease. In this paper, we propose an approach for
hospital recommendation based on disease. Our focus is on how to obtain and rank
answers based on incomplete information and provide personalization. To cope with
incomplete and noisy data, we allow both exact and close matches when answering
queries. We also present an intuitive approach to display answers to users, which
aims to help users to understand the ranked results and possibly refine their queries.
REFERENCES
[1] Yuji Mizuno; Teppei Baba; Yoshito Tanaka; Fujio Kurokawa; Masaharu Tanaka;
Ilhami Colak; Nobumasa Matsu “A New Load Prediction Method and Management of
Distributed Power System in Island Mode of a Large Hospital”/2018
[2]B. Hu and M. Ester, “Social topic modeling for point-of-interest recommendation in
location-based social networks,” in 2014 IEEE International Conference on Data
Mining (ICDM), pp. 845–850, IEEE, 2014.
[5]Z. Yao, Y. Fu, B. Liu, Y. Liu, and H. Xiong, “Poi recommendation: A temporal
matching between poi popularity and user regularity,” in 2016 IEEE 16th International
Conference on Data Mining (ICDM), pp. 549– 558, IEEE, 2016
[6]Min Chen, Yixue Hao, Kai Hwang, Lu Wang. “Disease prediction by Machine
Learning over big data from Healthcare Communities” IEEE-2015
[7]Bo Hu and Martin Ester “Social topic modelling for point of interest
recommendation in location based social networks”/2014 IEEE
APPENDIX
A.SAMPLE CODING
import pickle
import numpy as np
import os
import json
import termcolor
import smtplib
import CurrentStats
# import CancerModel
# import PdfConverter
import DiseasePred
# import warnings
app = Flask(__name__)
app.config['SECRET_KEY'] = '73a4b6ca8cb647a20b71423e31492452'
# For Coronavirus
logisticRegression = pickle.load(f)
# For Chronic kidney disease
decisionTree = pickle.load(f)
randomForest = pickle.load(f)
@app.route("/")
@app.route("/home")
def Homepage():
@app.errorhandler(404)
def page_not_found(e):
return render_template("PageNotFound.html")
# def CurrentStatus():
# state = ""
# try:
# if request.method == "POST":
# # print(request.form)
# formDict = request.form
# state = formDict['state']
# # print(state)
# except UnboundLocalError:
# except ValueError:
@app.route("/about")
def About():
return render_template("About.html")
def Contact():
if request.method == "POST":
# print(request.form)
contactDict = request.form
firstname = contactDict['firstname']
lastname = contactDict['lastname']
email = contactDict['email']
phone = int(contactDict['phone'])
description = contactDict['description']
sender = "[email protected]"
receiver = "[email protected]"
password = "intmain@11"
print(content)
try:
mail.ehlo()
mail.starttls()
mail.login(sender, password)
mail.ehlo()
except:
pass
return render_template("Contact.html")
@app.route("/infected")
def Infected():
@app.route("/noninfected")
def NonInfected():
return render_template("NonInfected.htm")
@app.route("/download")
def Download():
file = "static/Example.docx"
def BreastCancer():
# if request.method == "POST":
# f = request.files['inputFile']
# print(extension)
# try:
# f.save(location)
# PdfConverter.Convert(f.filename)
# prediction = CancerModel.Predict(
# os.path.join("Received_Files", image))
# else:
# prediction = CancerModel.Predict(
# os.path.join("Received_Files", f.filename))
# print(prediction)
# if prediction:
# else:
# return render_template("NonInfected.htm")
# else:
# flash(
# except ValueError:
# except PDFPageCountError:
return render_template("breastcacernotfound.html")
def Heart_disease():
if request.method == "POST":
# print(request.form)
heart_dict = request.form
age = int(heart_dict['age'])
gender = int(heart_dict['gender'])
height = int(heart_dict['height'])
weight = int(heart_dict['weight'])
sbp = int(heart_dict['sbp'])
dbp = int(heart_dict['dbp'])
cholestrol = int(heart_dict['cholestrol'])
glucose = int(heart_dict['glucose'])
smoke = int(heart_dict['smoke'])
alcohol = int(heart_dict['alcohol'])
active = int(heart_dict['active'])
age = age*365
prediction = randomForest.predict([model_input])[0]
if prediction:
else:
return render_template("NonInfected.htm")
symptoms = []
if request.method == "POST":
rf = request.form
# print(rf)
# print(key)
symptoms.append(value)
print(symptoms)
else:
prediction = DiseasePred.predicts(symptoms)
if prediction:
else:
return render_template("NonInfected.htm")
return render_template("dp.html")
def CKD():
if request.method == "POST":
submitted_values = request.form
sg = str(float(submitted_values["sg"].strip()))
albumin = str(float(submitted_values["albumin"].strip()))
hemoglobin = str(float(submitted_values["hemoglobin"].strip()))
pcv = str(float(submitted_values["pcv"].strip()))
hypertension = str(float(submitted_values["hypertension"].strip()))
sc = str(float(submitted_values["sc"].strip()))
prediction = decisionTree.predict([ckd_inputs1])
if not prediction:
else:
return render_template("NonInfected.htm")
def Coronavirus():
if request.method == "POST":
# print(request.form)
submitted_values = request.form
temperature = float(submitted_values["temperature"].strip())
age = int(submitted_values["age"])
cough = int(submitted_values["cough"])
cold = int(submitted_values["cold"])
sore_throat = int(submitted_values["sore_throat"])
body_pain = int(submitted_values["body_pain"])
fatigue = int(submitted_values["fatigue"])
headache = int(submitted_values["headache"])
diarrhea = int(submitted_values["diarrhea"])
difficult_breathing = int(submitted_values["difficult_breathing"])
travelled14 = int(submitted_values["travelled14"])
travel_covid = int(submitted_values["travel_covid"])
covid_contact = int(submitted_values["covid_contact"])
prediction = logisticRegression.predict([model_inputs])[0]
if prediction:
else:
return render_template("NonInfected.htm")
app.run(threaded=True, debug=True)
C. PLAGIARISM REPORT :