You are on page 1of 37

HEALTH TRACKER : A Fitness Application for Indoor

Based Exercise Recognition and Comfort Analysis For Diabetic


Patients
Contents

1. Introduction
2. System Analysis
2.1 Existing System
2.2 Proposed System
2.2.1 Scope of the Project
2.2.2 Aim of the project
2.2.3 Project Modules

3. Literature review
4. Requirement Specifications
3.1 Details of Software
3.1.1 Python
3.1.2 Anaconda
3.2 System requirements
3.2.1 Hardware Configuration
3.2.2 Software Configuration

5. System Design
4.1 Data Flow Diagram
4.2 Sequence Diagram

6. System Implementation
5.1 Modular Description

7. Bibliography
ABSTRACT
Nowadays, more individuals are being diagnosed with diseases that are
becoming chronic due to not following the proper diet, not doing proper
exercise regularly, or not giving proper attention to the diseases because of
busy schedules. Hence, we propose a system that aims at improving the
health of the patients suffering from Diabetic by recommending them
healthier diet and exercise plans by analyzing and monitoring health
parameters and the values from their latest reports related to the disease. We
considered patients suffering from either Diabetes. Our System can be
essentially useful for the doctors to recommend diet and exercise based on
their latest reports and personal health details. For this, we have broadly
classified our system into 2 modules: 1. Health Monitoring, 2. Diet &
Exercise Recommendation. In the Health Monitoring module, the system
would suggest follow-up sessions until the reports come normal. For the Diet
and Exercise Recommendation module, the algorithm that is used is a
Logistic regression for classification.
CHAPTER: I
INTRODUCTION
1.1 BACKGROUND:
In this project, we have modeled a Health Monitoring system with Diet and Fitness
recommendation. We are specific to Diabetes, Diabetes is most widely spread across
the people which require proper health monitoring and treatment. The
recommendation system will provide information based on user requirements and
constraints. We divided our system into 2 modules 1. Health Monitoring System 2.
Diet & Exercise Recommendation. For Diet and Exercise Recommendation module,
the Logistic regression classifier is used. It has additional features like pre pruning,
handling continuous attributes and missing values, and rule induction which helps in
the accuracy of the model than a decision tree classifier.
A personalized healthcare recommendation system consists of diet and exercise
mainly considering user’s profile and accordingly the food items are suggested. The
food item varies for diabetes diseases. But the purpose of our diet and fitness
recommendation is to make sure that it is adaptable and practical to users.
1.2 SCOPE OF THE WORK:
In recent years, Monitoring blood sugar helps to determine if you are meeting
your glucose targets which helps to reduce the unpleasant symptoms of high and
low blood sugar, and avoid long-term diabetes complications.
1.3 MOTIVATION:

The health is also an important factor in human life. Due to busy schedules, workload,
people are not paying attention to their health and fitness. Physical inactivity is the most
important problem in today’s generation. Maintaining their daily routine of diet and
exercise is what people need to be fit. So people need some amount of nutrition to be
healthy and maintain their health. Diet and exercise, if consider in general, varies from
users having different lifestyles, height, weight, sex, age, and activity level. Diet and
exercise are both correlated. To maintain sugar level, it is required to balance the intake
of calories. So, we have motivated to implement android application system would help
doctors to recommend diet and exercise to their patients suffering from Diabetes.
1.4 PROBLEM STSTEMENT:

Developing and implementing an app for achieving health and fitness activity, do
workout, exercises & meal planning for patients of diabetes because many fitness and
wellness organizations do not know how to effectively serve this population nor how to
support their inclusion into their programs.

1.5 ORGANIZATION OF PROJECT

The project report is organized as follows:

• Chapter 1-Introduction
This chapter tells about the problem statement, background of the project,
motivation, problem statement and scope of the project with its theoretical outline.
• Chapter 2-System Analysis
This chapter tells about the Existing system, proposed system, aim, scope of the
project and list of the modules.
• Chapter 3-Literature review
Gives brief overview of the paper and the research sources that have been studied
to establish through an understanding of the under consideration.

• Chapter 4- Requirement Specifications


Discuss in detail about the different kind of requirement needed t successfully
complete the project.
• Chapter 5-System Design:
Gives the design description of the project, conceptual and detailed design well
supported with the design diagrams.
• Chapter 6-System Implementation:
Gives the implementation description of the project, modules and its description
and methodologies used to develop this project.

SUMMARY

This chapter tells about the problem statement, background of the project, motivation,
problem statement and scope of the project and about how we use this information to
develop the project that monitor the health of diabetic patients.
CHAPTER: II
SYSTEM ANALYSIS
2.1 Existing System
• Authors proposed Health care recommendation system was built using ontology
framework for food and exercise recommendation. Decision tree algorithm was
used for getting user’s information from the data-set.

• Researchers proposed Four different algorithms (k-nearest neighbors, Support


vector machine, Random forest, AdaBoost) were used and among this Random
forest gave more accuracy and score than other three, i.e. 60 to 70 % for health
monitoring that checked the patient’s ECGs suffering from LQTS genetic disorder
and identified patients with a high risk of cardiac events.

• Authors proposed Data analysis was done using different machine learning
models like Random Forest, Support Vector Machine, and Deep Learning for
remote health monitoring for Elderly People.

• Authors proposed The system extracts the features from UCI Chronic kidney data
set which was responsible for Chronic Kidney Disease, After that, ML automated
the classification of different stages in the CKD with respect to its severity.

• Authors proposed A web-based diet recommendation system using Health


Calabria Food Database claims to improve the health of people affected due to
chronic disease.

• Authors implemented Recommendation system was built for amateur as well as


professional runner, which gives recommendations to the users by suggesting their
diet and workout that will suit them, based on the inputs they provide on the
system using Social Semantic Web.

2.2 Disadvantages of Existing System:


1. All the existing approaches is implemented as desktop/ web application,
which is not supports for the mobile.
2. It consumes more time to train the model.
3. Most of the system gives less accuracy in recommendation of exercises.
2.3 Proposed System
We propose a machine learning approach based on Logistic regression to
recommend the exercise for the diabetic patients, which supports for android application.

2.2.1 Scope of the Project


In recent years, Monitoring blood sugar helps to determine if you are meeting
your glucose targets which helps to reduce the unpleasant symptoms of high and low
blood sugar, and avoid long-term diabetes complications.
2.2.2 Aim of the project
 To build a mobile application automatically recommend exercise for diabetic
patients.
 To build a simple and low cost assistance system to recommend exercise for
diabetic patients.
 To monitor the diabetic patient’s activity.
 To help diabetic patient to know the exercise.

2.2.3 Project Modules


1. Designing Interface
2. Collecting dataset
3. Preprocess
4. Recommendation of exercise

SUMMARY
This chapter tells about the Existing system, proposed system, scope of the project, aim
and list of the modules to develop the project that recommends the exercise.
CHAPTER: III
LITERATURE REVIEW
A literature survey or a literature review in a project report shows the various
analyses and research made in the field of interest and the results already published,
taking into account the various parameters of the project and the extent of the project.
Literature survey is mainly carried out in order to analyze the background of the current
project which helps to find out flaws in the existing system & guides on which unsolved
problems we can work out. So, the following topics not only illustrate the background
of the project but also uncover the problems and flaws which motivated to propose
solutions and work on this project.

A literature survey is a text of a scholarly paper, which includes the current


knowledge including substantive findings, as well as theoretical and methodological
contributions to a particular topic. Literature reviews use secondary sources, and do
not report new or original experimental work. Most often associated with academic-
oriented literature, such as a thesis, dissertation or a peer-reviewed journal article, a
literature review usually precedes the methodology and results sectional though this is
not always the case. Literature reviews are also common in are search proposal or
prospectus (the document that is approved before a student formally begins a
dissertation or thesis). Its main goals are to situate the current study within the body of
literature and to provide context for the particular reader. Literature reviews are a
basis for researching nearly every academic field. demic field. A literature survey
includes the following:

• Existing theories about the topic which are accepted universally.

• Books written on the topic, both generic and specific.

• Research done in the field usually in the order of oldest to latest.

• Challenges being faced and on-going work, if available.

Literature survey describes about the existing work on the given project. It deals with the
problem associated with the existing system and also gives user a clear knowledge on
how to
deal with the existing problems and how to provide solution to the existing problems
Objectives of Literature Survey
• Learning the definitions of the concepts.

• Access to latest approaches, methods and theories.

• Discovering research topics based on the existing research

• Concentrate on your own field of expertise– Even if another field uses the same
words, they usually mean completely.
• It improves the quality of the literature survey to exclude sidetracks– Remember
to explicate what is excluded.
Before building our application, the following system is taken into consideration:

3.1 RELATED WORK

1. Title: Machine learning and artificial intelligence based Diabetes Mellitus


detection and self-management: A systematic review
Author: Jyotismita Chaki S.Thillai Ganesh S.KCidham S.Ananda Theertan
Abstract: Diabetes Mellitus (DM) is a condition induced by unregulated diabetes that
may lead to multi-organ failure in patients. Thanks to advances in machine learning and
artificial intelligence, which enables the early detection and diagnosis of DM through an
automated process which is more advantageous than a manual diagnosis. Currently, many
articles are published on automatic DM detection, diagnosis, and self-management via
machine learning and artificial intelligence techniques. This review delivers an analysis of
the detection, diagnosis, and self-management techniques of DM from six different facets
viz., datasets of DM, pre-processing methods, feature extraction methods, machine
learning-based identification, classification, and diagnosis of DM, artificial intelligence-
based intelligent DM assistant and performance measures. It also discusses the
conclusions of the previous study and the importance of the results of the study. Also,
three current research issues in the field of DM detection and diagnosis and self-
management and personalization are listed. After a thorough screening procedure, 107
main publications from the Scopus and PubMed repositories are chosen for this study.
This review provides a detailed overview of DM detection and self-management
techniques which may prove valuable to the community of scientists employed in the area
of automatic DM detection and self-management.
Remarks:
It uses various machine learning and deep learning algorithms to diagnosis of Diabetes
Mellitus.
It does not recommend the workouts.

2. Title: Body fat predicts exercise capacity in persons with Type 2 Diabetes
Mellitus: A machine learning approach
Author: Tanmay Nath, Rexford S. Ahima, and Prasanna Santhanam,
Abstract: Diabetes mellitus is associated with increased cardiovascular disease (CVD)
related morbidity, mortality and death. Exercise capacity in persons with type 2 diabetes
has been shown to be predictive of cardiovascular events. In this study, we used the data
from the prospective randomized LOOK AHEAD study and used machine learning
algorithms to help predict exercise capacity (measured in Mets) from the baseline data
that included cardiovascular history, medications, blood pressure, demographic
information, anthropometric and Dual-energy X-Ray Absorptiometry (DXA) measured
body composition metrics. We excluded variables with high collinearity and included
DXA obtained Subtotal (total minus head) fat percentage and Subtotal lean mass (gms).
Thereafter, we used different machine learning methods to predict maximum exercise
capacity. The different machine learning models showed a strong predictive performance
for both females and males. Our study shows that using baseline data from a large
prospective cohort, we can predict maximum exercise capacity in persons with diabetes
mellitus. We show that subtotal fat percentage is the most important feature for predicting
the exercise capacity for males and females after accounting for other important variables.
Until now, BMI and waist circumference were commonly used surrogates for adiposity
and there was a relative under-appreciation of body composition metrics for
understanding the pathophysiology of CVD. The recognition of body fat percentage as an
important marker in determining CVD risk has prognostic implications with respect to
cardiovascular morbidity and mortality.
Remarks:
It uses the various machine learning algorithms to recommend the exercise.
It does not support for monitoring and mobile.
3. Title: Design and Development of Diabetes Management System Using Machine
Learning
Author Robert A. Sowah , Adelaide A. Bampoe-Addo, Stephen K. Armoo,Firibu K.
Saalia, Francis Gatsi, and Baffour Sarkodie-Mensah
Abstract: This paper describes the design and implementation of a software system to
improve the management of diabetes using a machine learning approach and to
demonstrate and evaluate its effectiveness in controlling diabetes. The proposed approach
for this management system handles the various factors that affect the health of people
with diabetes by combining multiple artificial intelligence algorithms. The proposed
framework factors the diabetes management problem into subgoals: building a
Tensorflow neural network model for food classification; thus, it allows users to upload
an image to determine if a meal is recommended for consumption; implementing K-
Nearest Neighbour (KNN) algorithm to recommend meals; using cognitive sciences to
build a diabetes question and answer chatbot; tracking user activity, user geolocation, and
generating pdfs of logged blood sugar readings. The food recognition model was
evaluated with cross-entropy metrics that support validation using Neural networks with a
backpropagation algorithm. The model learned features of the images fed from local
Ghanaian dishes with specific nutritional value and essence in managing diabetics and
provided accurate image classification with given labels and corresponding accuracy. The
model achieved specified goals by predicting with high accuracy, labels of new images.
The food recognition and classification model achieved over 95% accuracy levels for
specific calorie intakes. The performance of the meal recommender model and question
and answer chatbot was tested with a designed cross-platform user-friendly interface
using Cordova and Ionic Frameworks for software development for both mobile and web
applications. The system recommended meals to meet the calorific needs of users
successfully using KNN (with ) and answered questions asked in a human-like way. The
implemented system would solve the problem of managing activity, dieting
recommendations, and medication notification of diabetics.
Remarks:
It uses KNN algorithm to diagnosis of Diabetes Mellitus.
It does not recommend the workouts.
4. Title: Blood Glucose Level Forecasting on Type-1-Diabetes Subjects during
Physical Activity: A Comparative Analysis of Different Learning Techniques
Author Benedetta De Paoli , Federico D’Antoni , Mario Merone , Silvia Pieralice ,
Vincenzo Piemonte and Paolo Pozzilli.
Abstract: Background: Type 1 Diabetes Mellitus (T1DM) is a widespread chronic
disease in industrialized countries. Preventing blood glucose levels from exceeding the
euglycaemic range would reduce the incidence of diabetes-related complications and
improve the quality of life of subjects with T1DM. As a consequence, in the last decade,
many Machine Learning algorithms aiming to forecast future blood glucose levels have
been proposed. Despite the excellent performance they obtained, the prediction of abrupt
changes in blood glucose values produced during physical activity (PA) is still one of the
main challenges. Methods: A Jump Neural Network was developed in order to overcome
the issue of predicting blood glucose values during PA. Three learning configurations
were developed and tested: offline training, online training, and online training with
reinforcement. All configurations were tested on six subjects suffering from T1DM that
held regular PA (three aerobic and three anaerobic) and exploited Continuous Glucose
Monitoring (CGM). Results: The forecasting performance was evaluated in terms of the
Root-Mean-Squared-Error (RMSE), according to a paradigm of Precision Medicine.
Conclusions: The online learning configurations performed better than the offline
configuration in total days but not on the only CGM associated with the PA; thus, the
results do not justify the increased computational burden because the improvement was
not significant.
Remarks:
It uses CNN algorithm to diagnosis of Diabetes Mellitus.
It does not recommend the workouts.
.
5. Title: Machine learning-based glucose prediction with use of continuous glucose
and physical activity monitoring data: The Maastricht Study
Author William P. T. M. van Doorn ,Yuri D. Foreman ,Nicolaas C. Schaper,Hans H.
C. M. Savelberg,Annemarie Koster,Carla J. H. van der Kallen,Anke
Wesselius,Miranda T. Schram,Ronald M. A. Henry,Pieter C. Dagnelie,Bastiaan E.
de Galan,Otto Bekers,Coen D. A. Stehouwer,Steven J. R. Meex ,Martijn C. G. J.
Brouwers
Abstract: Closed-loop insulin delivery systems, which integrate continuous glucose
monitoring (CGM) and algorithms that continuously guide insulin dosing, have been
shown to improve glycaemic control. The ability to predict future glucose values can
further optimize such devices. In this study, we used machine learning to train models in
predicting future glucose levels based on prior CGM and accelerometry data. We used
data from The Maastricht Study, an observational population-based cohort that comprises
individuals with normal glucose metabolism, prediabetes, or type 2 diabetes. We included
individuals who underwent >48h of CGM (n = 851), most of whom (n = 540)
simultaneously wore an accelerometer to assess physical activity. A random subset of
individuals was used to train models in predicting glucose levels at 15- and 60-minute
intervals based on either CGM data or both CGM and accelerometer data. In the
remaining individuals, model performance was evaluated with root-mean-square error
(RMSE), Spearman’s correlation coefficient (rho) and surveillance error grid. For a
proof-of-concept translation, CGM based prediction models were optimized and validated
with the use of data from individuals with type 1 diabetes (OhioT1DM Dataset, n = 6).
Remarks:
It uses various machine algorithms to detect glucose level and monitoring.
It does not recommend the workouts.

3.2 Literature Summary:

S.N TITLE AUTHO METHODOLOG ADVANTAG DISADVANTA


O R IES USED ES GES
1 Machine Jyotismit CNN, Random It gives It does not
learning a Chaki Forest,SVM,KNN accuracy in recommend the
and S.Thillai detecting workouts.
artificial Ganesh diabetes up to
intelligenc S.KCidha 95%.
e based m
Diabetes S.Ananda
Mellitus Theertan
detection
and self-
manageme
nt: A
systematic
review
2 Body fat Tanmay SVM, KNN, It is used to It does not
predicts Nath, Decision tree recommend support for
exercise Rexford the workout workout
capacity in S. for diabetic monitoring
persons Ahima, patients. It is not suitable
with Type and for mobile
2 Diabetes Prasanna application.
Mellitus: Santhana
A machine m,
learning
approach
3 Design and Robert A. KNN It give It does not
Developm Sowah , accuracy up to recommend the
ent of Adelaide 90%. workouts.
Diabetes A.
Manageme Bampoe-
nt System Addo,
Using
Machine
Learning
4 Title: Benedett CNN It give high It does not
Blood a De Accuracy recommend the
Glucose Paoli , workouts.
Level Federico
Forecastin D’Antoni
g on Type- , Mario
1-Diabetes Merone ,
Subjects Silvia
during Pieralice
Physical ,
Activity: A Vincenzo
Comparati Piemonte
ve and Paolo
Analysis Pozzilli.
of
Different
Learning
Technique
s
5 Machine William SVM,KNN It uses various It does not
learning- P. T. M. machine recommend the
based van algorithms to workouts.
glucose Doorn ,Y detect glucose
prediction uri D. level and
with use of Foreman monitoring.
continuous
glucose
and
physical
activity
monitoring
data: The
Maastricht
Study

SUMMARY
This chapter tells about literature summary about the project that recommends exercise.
CHAPTER: IV
REQUIREMENT SPECIFICATIONS
System Requirement Specification (SRS) is a central report, which frames the
establishment of the product advancement process. It records the necessities of a
framework as well as has a depiction of its significant highlight. An SRS is essentially
an association's seeing (in composing) of a client or potential customer's frame work
necessities and conditions at a specific point in time (generally) before any genuine
configuration or improvement work. It's a two-way protection approach that guarantees
that both the customer and the association comprehend alternate's necessities from that
viewpoint at a given point in time.
The SRS talks about the item however not the venture that created it,
consequently the SRS serves as a premise for later improvement of the completed item.
The SRS may need to be changed, however it does give an establishment to proceed
with creation assessment. In straightforward words, programming necessity
determination is the beginning stage of the product improvement action.
The SRS means deciphering the thoughts in the brains of the customers – the
information, into a formal archive – the yield of the prerequisite stage. Subsequently the
yield of the stage is a situated of formally determined necessities, which ideally are
finished and steady, while the data has none of these properties.
4.1 Details of Software
4.1.1 ANDROID:
What is Android?
Android is an open source and Linux-based Operating System for mobile
devices such as smartphones and tablet computers. Android was developed by
the Open Handset Alliance, led by Google, and other companies.
Android offers a unified approach to application development for mobile
devices which means developers need only develop for Android, and their
applications should be able to run on different devices powered by Android.
The first beta version of the Android Software Development Kit (SDK) was
released by Google in 2007 where as the first commercial version, Android 1.0,
was released in September 2008.
On June 27, 2012, at the Google I/O conference, Google announced the next
Android version, 4.1 Jelly Bean. Jelly Bean is an incremental update, with the
primary aim of improving the user interface, both in terms of functionality and
performance.
The source code for Android is available under free and open source software
licenses. Google publishes most of the code under the Apache License version 2.0
and the rest, Linux kernel changes, under the GNU General Public License
version 2.
Why Android ?

Features of Android
Android is a powerful operating system competing with Apple 4GS and
supports great features. Few of them are listed below −
Sr.No. Feature & Description

1 Beautiful UI
Android OS basic screen provides a beautiful and intuitive user
interface.

2 Connectivity
GSM/EDGE, IDEN, CDMA, EV-DO, UMTS, Bluetooth, Wi-Fi, LTE,
NFC and WiMAX.

3 Storage
SQLite, a lightweight relational database, is used for data storage
purposes.

4 Media support
H.263, H.264, MPEG-4 SP, AMR, AMR-WB, AAC, HE-AAC, AAC
5.1, MP3, MIDI, Ogg Vorbis, WAV, JPEG, PNG, GIF, and BMP.

5 Messaging
SMS and MMS

6 Web browser
Based on the open-source WebKit layout engine, coupled with Chrome's
V8 JavaScript engine supporting HTML5 and CSS3.

7 Multi-touch
Android has native support for multi-touch which was initially made
available in handsets such as the HTC Hero.

8 Multi-tasking
User can jump from one task to another and same time various
application can run simultaneously.

9 Resizable widgets
Widgets are resizable, so users can expand them to show more content
or shrink them to save space.

10 Multi-Language
Supports single direction and bi-directional text.

11 GCM
Google Cloud Messaging (GCM) is a service that lets developers send
short message data to their users on Android devices, without needing a
proprietary sync solution.

12 Wi-Fi Direct
A technology that lets apps discover and pair directly, over a high-
bandwidth peer-to-peer connection.

13 Android Beam
A popular NFC-based technology that lets users instantly share, just by
touching two NFC-enabled phones together.

Android Applications
Android applications are usually developed in the Java language using the
Android Software Development Kit.
Once developed, Android applications can be packaged easily and sold out
either through a store such as Google Play, SlideME, Opera Mobile
Store, Mobango, F-droid and the Amazon Appstore.
Android powers hundreds of millions of mobile devices in more than 190
countries around the world. It's the largest installed base of any mobile platform
and growing fast. Every day more than 1 million new Android devices are
activated worldwide.
This tutorial has been written with an aim to teach you how to develop and
package Android application. We will start from environment setup for Android
application programming and then drill down to look into various aspects of
Android applications.
Categories of Android applications
There are many android applications in the market. The top categories are −
History of Android
The code names of android ranges from A to N currently, such as Aestro,
Blender, Cupcake, Donut, Eclair, Froyo, Gingerbread, Honeycomb, Ice Cream
Sandwitch, Jelly Bean, KitKat, Lollipop and Marshmallow. Let's understand the
android history in a sequence.

4.2 System requirements


4.2.1 Hardware Configuration
 System : Intel I5.
 Hard Disk : 120 GB.
 Monitor : 15’’ LED
 Input Devices : Keyboard, Mouse
 Ram : 8 GB

CPU- INTEL CORE i5


Fig 4.1 INTEL CORE i5
Intel Core is a brand name that Intel uses for various mid-range to high-end consumer
and business microprocessors. As of 2015 the current line up of Core processors
included the Intel Core i7, Intel Core i5, and Intel Core i3. 5th generation Intel®
Core™ i5 processors empower new innovations like Intel® Real Sense™ technology
—bringing you features such as gesture control, 3D capture and edit, and innovative
photo and video capabilities to your devices. Enjoy stunning visuals, built-in security,
and an automatic burst of speed when you need it with Intel® Turbo Boost
Technology 2.0.

RAM

Fig 4.2 RAM 512 GB


When you load up an application on to your computer it loads into your available RAM
memory. It is very quick type of memory. The more programs you load up, the more
RAM is taken up. At the point where you have loaded up enough apps to take up all your
free available physical RAM, your OS will create a swap-file on your hard drive. This file
is used as a reserve for all additional apps you run. The trouble with that is that hard
drives are a lot slower to read and write from than RAM memory is. Therefore, your
computer will perform much slower at that point. Although new generation of SSD hard
drives are much faster than your traditional spinning drive, it is still best to have enough
RAM available. If you are using Windows and want to want to know how much RAM
you are using up, you can right click on task bar, then select start "Task Manager" and on
the "performance" tab you will see a green bar indicating "Memory".
HARD DISK:

Fig 4.3 Hard Disk Drive


A hard disk drive (HDD), hard disk, hard drive or fixed disk is a data storage device used
for storing and retrieving digital information using one or more rigid ("hard") rapidly
rotating disks (platters) coated with magnetic material. The platters are paired with
magnetic heads arranged on a moving actuator arm, which read and write data to the
platter surfaces. Data is accessed in a random-access manner, meaning that individual
blocks of data can be stored or retrieved in any order rather than sequentially. An HDD
retains its data even when powered off.

1.2.2 Software Configuration


 Operating system : Windows 7 and above.
 Coding Language : PYTHON 3.6
 Tools : Anaconda

SUMMARY
This chapter tells about the all the hardware and software required for implementing the
system and each requirement will be used.

CHAPTER: V
SYSTEM DESIGN
The system “design” is defined as the process of applying various requirements
and permits it physical realization. Various design features are followed to develop the
system the design specification describes the features of the system, the opponent or
elements of the system and their appearance to the end-users.

5.1 SYSTEM ARCHITECTURE

Fig 5.1 System Architecture of Exercise recommendation

In the above fig.1 shows the proposed machine learning framework-based logistic
regression workout recommendation system. In the first step, data gathered from the user.
To beat this trouble and provide data trends, collected data must go through a cleaning
process. This process includes data transformation, metadata enrichment exploitation,
exploration, for example, entering missing values, removing unnecessary or invalid data
that is not required to obtain data trends, then data validation. Then we are applying the
logistic regression algorithm to get the recommendation.

5.2 Data Flow Diagram


A data flow diagram (DFD) is a graphical representation of the "flow" of data
through an information system, modelling its process aspects. A DFD is often used as a
preliminary step to create an overview of the system without going into great detail,
which can later be elaborated. DFDs can also be used for the visualization of data
processing.

Data Flow Diagram:

Level:0

0.1

Health Dataset Efficient Result


recommendation of
exercise using
Logistic regression

Level 0 Describes the overall process of this project. we are health dataset of diabetic
patients as input to the system, our system uses logistic regression algorithm to predicts
the disease severity and recommends the exercise and monitor the health.

Level: 1
collect
1.1 1.2

Dataset preprocess Extract Features

clean

features

Features

Level 1 Describes the first stage process of this project. we are passing
health dataset as input to the system will preprocess and extract the
important features.
Level 2:

Features 2.1

Read the 2.2


features
Detection of
diabetic level

2.3

No
high?
Norm
al

yes

Recommended
exercise

Level 2 Describes the final stage process of this project. we are passing
extracted features from level by applying logistic regression model system
will recommend the exercise to the user.

5.3 Sequence Diagram


User System

Load Dataset

Read

Preprocess

Train

Detect severity

Recommendati
Monitoring on of exercise

SUMMARY
This chapter tells about the system design, its architecture and how data flows through each
level. Also, the how the system will work with the use of diagram.

CHAPTER: VI
SYSTEM IMPLEMENTATION
6.1 List of Modules:
1. Designing Interface
2. Collecting dataset
3. Preprocess
4. Recommendation of exercise

6.2 Modular Description:


6.2.1 Designing Interface:
We are designing the interface for user to enter their health records using android
application. A user interacts with the system by adding body details like height, weight,
age, gender, lifestyle, activity level of Diabetes, and current reports related to Diabetes
disease.
Steps:
1) A patient/doctor here is the actor or user who will use this system.
2) User Interface - A user interacts with the system by adding body details like
height, weight, age, gender, lifestyle, activity level of Diabetes, and current
reports related to Diabetes disease
3) Patient’s Health Record - All the details mentioned in POINT 2 will be stored
here.
4) Doctor’s Database - The fixed Parameter to detect category of disease i.e if the
person is Normal or is suffering from Prediabetes or Diabetes from the reports of
the specific disease is stored here.

Exercise Recommendation: By applying the Logistic regression algorithm our app will
suggest exercise to the patients.
6.2.2 DATASET COLLECTION:
We have collected diabetic patient health report dataset from the uci machine learning
repository. Which has the following attributes
 Height
 Weight
 Age
 Gender
 Lifestyle
 activity level of Diabetes
 current reports

6.2.2 DATA PRE-PROCESSING


When the dataset is extracted, part of the data contains some noisy data, duplicate values,
missing values, infinity values, etc. due to extraction errors or input errors. Therefore, we
first perform data preprocessing. The main work is as follows.
(1) Duplicate values: delete the sample’s duplicate value, only keep one valid data.
(2) Outliers: in the sample data, the sample size of missing values(Not a Number, NaN)
and Infinite values(Inf) is small, so we delete this.
6.2.3 RECOMMENDATION OF EXCERSICE:
The fixed Parameter to detect category of disease i.e if the person is Normal or is
suffering from Prediabetes or Diabetes from the reports of the specific disease is stored
here. By applying the Logistic regression algorithm our app will suggest exercise to the
patients.

1.3 Methodologies Used:

• LOGISTIC REGRESSION:
Logistic regression is a supervised learning classification algorithm used to predict
the probability of a target variable. The nature of target or dependent variable is
dichotomous, which means there would be only two possible classes.
In simple words, the dependent variable is binary in nature having data coded as
either 1 (stands for success/yes) or 0 (stands for failure/no).
Mathematically, a logistic regression model predicts P(Y=1) as a function of X. It is
one of the simplest ML algorithms that can be used for various classification
problems such as spam detection, Diabetes prediction, cancer detection etc.
Logistic Regression Assumptions
Before diving into the implementation of logistic regression, we must be aware of the
following assumptions about the same −
In case of binary logistic regression, the target variables must be binary always and
the desired outcome is represented by the factor level 1.
There should not be any multi-collinearity in the model, which means the
independent variables must be independent of each other.
We must include meaningful variables in our model.
We should choose a large sample size for logistic regression.
Binary Logistic Regression model
The simplest form of logistic regression is binary or binomial logistic regression in
which the target or dependent variable can have only 2 possible types either 1 or 0. It
allows us to model a relationship between multiple predictor variables and a
binary/binomial target variable. In case of logistic regression, the linear function is
basically used as an input to another function such as 𝑔 in the following relation −

Here, 𝑔 is the logistic or sigmoid function which can be given as follows –

To sigmoid curve can be represented with the help of following graph. We can see
the values of y-axis lie between 0 and 1 and crosses the axis at 0.5.

The classes can be divided into positive or negative. The output comes under the
probability of positive class if it lies between 0 and 1. For our implementation, we are
interpreting the output of hypothesis function as positive if it is ≥0.5, otherwise
negative.
We also need to define a loss function to measure how well the algorithm performs
using the weights on functions, represented by theta as follows −
ℎ=𝑔(𝑋𝜃)

SUMMARY:
This chapter tells about the system implementation with the modules, modules descriptions
and methodologies used in the project.
SYSTEM TESTING
The purpose of testing is to discover errors. Testing is the process of trying to
discover every conceivable fault or weakness in a work product. It provides a way to
check the functionality of components, sub assemblies, assemblies and/or a finished
product It is the process of exercising software with the intent of ensuring that the
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.
7.1TYPES OF TESTS
7.1.1Unit 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 performs accurately to the documented specifications
and contains clearly defined inputs and expected results.
7.2 Integration testing

Integration tests are designed to test integrated software components to determine


if they actually run as one program. Testing is event driven and is more concerned with
the basic outcome of screens or fields. Integration tests demonstrate that although the
components were individually satisfaction, as shown by successfully unit testing, the
combination of components is correct and consistent. Integration testing is specifically
aimed at exposing the problems that arise from the combination of components.

7.3 Functional test

Functional tests provide systematic demonstrations that functions tested are available
as specified by the business and technical requirements, system documentation, and user
manuals.
Functional testing is centered on the following items:
Valid Input : identified classes of valid input must be accepted.
Invalid Input : identified classes of invalid input must be rejected.
Functions : identified functions must be exercised.
Output : identified classes of application outputs must be exercised.
Systems/Procedures: interfacing systems or procedures must be invoked.

Organization and preparation of functional tests is focused on requirements, key


functions, or special test cases. In addition, systematic coverage pertaining to identify
Business process flows; data fields, predefined processes, and successive processes must
be considered for testing. Before functional testing is complete, additional tests are
identified and the effective value of current tests is determined.
7.4 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.
7.5 White Box Testing
White Box Testing is a testing in which in which the software tester has knowledge
of the inner workings, structure and language of the software, or at least its purpose. It is
purpose. It is used to test areas that cannot be reached from a black box level.
7.6 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.
7.7 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.
7.7.1 Test strategy and approach
Field testing will be performed manually and functional tests will be written in
detail.
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.

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.
7.8 Integration Testing

Software integration testing is the incremental integration testing of two or more


integrated software components on a single platform to produce failures caused by
interface defects.
The task of the integration test is to check that components or software
applications, e.g. components in a software system or – one step up – software
applications at the company level – interact without error.
Test Results: All the test cases mentioned above passed successfully. No defects
encountered.
7.9 Acceptance Testing

User Acceptance Testing is a critical phase of any project and requires significant
participation by the end user. It also ensures that the system meets the functional
requirements.
Test Results: All the test cases mentioned above passed successfully. No defects
encountered.

Test cases
Test Case# TC01
Test Name User input format
Test Description To test user input values
Input Dataset and blood test values
Expected Output The file should be read by the program
Actual Output The file is read accordingly
Test Result Success

Test Case# UTC02


Test Name User input format
Test Description To test user input values
Input Input values as null
Expected Output It Should show the alert Message please fill the fields
Actual Output Shown alert message
Test Result Success

Test Case# UTC03


Test Name prediction
Test Description To test whether predicting diabetics or not
Input A dataset and user input
Expected Output The algorithm should predict the diabetic or not as per
historical data collected
Actual Output The predicted value by algorithm is closer to the
specified value in the historical data.
Test Result Success

Test Case# UTC04


Test Name Recommendation of diet
Test Description To test whether recommending diet or not
Input Input values
Expected Output It recommend diet and exercise using ML
Actual Output Its recommended the exercise and diet
Test Result Success

8. Results Screen Shot:


Kindly add from your system
Performance Evaluation:

CONCLUSION:

We proposed HEALTH TRACKER, an application to track the health of diabetic patients


to recommend exercises in real time. HEALTH TRACKER can be essentially useful for
the doctors to recommend diet and exercise based on their latest reports and personal
health details. In the HEALTH TRACKER, the system would suggest follow-up sessions
until the reports come normal. For the Diet and Exercise Recommendation module, the
algorithm that is used is a Logistic regression for classification.

BIBLIOGRAPHY
[1] Shreya B. Ahire, Harmeet Kaur Khanuja, ‘A Personalized Framework for Health Care
Recommendation’, International Conference on Computing Communication Control and
Automation, Pune, India, 26-27 Feb. 2015.
[2] Shurouq Hijazi, Alex Page, Burak Kantarci, Tolga Soyata, ‘Machine Learning in
Cardiac Health Monitoring and Decision Support’ Computer , vol. 49, Issue. 11, pp. 38 -
48, Nov. 2016.
[3] Poojitha Amin, Nikhitha R. Anikireddypally, Suraj Khurana, Sneha Vadakkemadathil,
Wencen Wu,‘Personalized Health Monitoring using Predictive Analytics,’ IEEE Fifth
International Conference on Big Data Computing Service and Applications
(BigDataService), Newark, CA, USA, 4-9 April 2019.
[4] Yurong Zhong, ‘The analysis of cases based on decision tree,’ 2016 7th IEEE
International Conference on Software Engineering and Service Science (ICSESS),
Beijing, China, Aug. 2016,
[5] He Zhang, Runjing Zhou, ‘ The analysis and optimization of decision tree based on
ID3 algorithm’, 2017 9th International Conference on Modelling, Identification and
Control (ICMIC),Kunming, China, 10-12 July 2017.
[6] Nawras Georgi, Regine Le Bouquin Jeanne`s, ‘Proposal of a remote monitoring
system for elderly health prevention’, 2017 International Conference on Smart, Monitored
and Controlled Cities (SM2C), Sfax, Tunisia, 17-19 Feb. 2017.
[7] Akash Maurya, Rahul Wable, Rasika Shinde, Sebin John, Rahul Jadhav, R Dakshayan
‘Chronic Kidney Disease Prediction and Recommendation of Suitable Diet Plan by using
Machine Learning’, 2019 International Conference on Nascent Technologies in
Engineering (ICNTE), Navi Mumbai, India, 4-5 Jan. 2019.
[8] Romeshwar Sookrah, Jaysree Devee Dhowtal, Soulakshmee Devi Nagowah, ’A
DASH Diet Recommendation System for Hypertensive Patients Using Machine
Learning,’ 2019 7th International Conference on Information and Communication
Technology (ICoICT), Kuala Lumpur, Malaysia,24-26 July 2019.
[9] Esther Gyimah, Delali Kwasi Dake , ‘Using Decision Tree Classification Algorithm to
Predict Learner Typologies for Project -Based Learning’, 2019 International Conference
on Computing, Computational Modelling and Applications (ICCMA), Cape Coast,
Ghana, 27-29 March 2019.
[10] Vivek Kumar, Roman Zinovyev, Abhishek Verma, Prayag Tiwari, ‘Performance
Evaluation of Lazy and Decision Tree Classifier: A Data Mining Approach for Global
Celebrity’s Death Analysis,’ 2018 International Conference on Research in Intelligent
and Computing in Engineering (RICE), San Salvador, El Salvador,22-24 Aug. 2018.
[11] G. Agapito, B. Calabrese, P. H. Guzzi, M. Cannataro, M. Simeoni, I. Care´, T.
Lamprinoudi, G. Fuiano,A. Pujia, ‘DIETOS: A recommender system for adaptive diet
monitoring and personalized food suggestion,’ 2016 IEEE 12th International Conference
on Wireless and Mobile Computing, Networking and Communications (WiMob), New
York, NY, USA,17-19 Oct. 2016.
[12] Mihnea Donciu, Madalina Ionita, Mihai Dascalu, Stefan Trausan-Matu, ‘The Runner
– Recommender System of Workout and Nutrition for Runners’, 2011 13th International
Symposium on Symbolic and Numeric Algorithms for Scientific Computing, Timisoara,
Romania,26-29 Sept. 2011
[13] Li Dongming, Li Yan, Yuan Chao, Li Chaoran, Liu Huan, Zhang Lijuan, ‘The
Application of Decision Tree C4.5 Algorithm to Soil Quality Grade Forecasting Model ’,
2016 First IEEE International Conference on Computer Communication and the Internet
(ICCCI), Wuhan, China, 13- 15 Oct. 2016.
[14] Izhar Alam, ’Diet Recommendation’ [Data set] 2020. Available:
https://www.kaggle.com/izharalam150/diet-recommendation.
[15] Joe89, ’721 Weight Training Workouts’ [Data set] 2018. Available:
https://www.kaggle.com/joep89/weightlifting.

You might also like