0% found this document useful (0 votes)
529 views

Glucose Level Monitoring Arduino Glucometer

The document discusses a proposed system for monitoring blood glucose levels in diabetic patients using IoT technology. The system would collect glucose readings using a wireless sensor and transmit the data to a mobile application and cloud database. The collected data would then be classified using machine learning algorithms to predict glucose levels and prevent hyperglycemic or hypoglycemic events.

Uploaded by

Nebitno Uopste
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
529 views

Glucose Level Monitoring Arduino Glucometer

The document discusses a proposed system for monitoring blood glucose levels in diabetic patients using IoT technology. The system would collect glucose readings using a wireless sensor and transmit the data to a mobile application and cloud database. The collected data would then be classified using machine learning algorithms to predict glucose levels and prevent hyperglycemic or hypoglycemic events.

Uploaded by

Nebitno Uopste
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

applied

sciences
Article
Glucose Data Classification for Diabetic
Patient Monitoring
Amine Rghioui 1, *, Jaime Lloret 2 , Lorena Parra 3 , Sandra Sendra 2 and Abdelmajid Oumnad 1
1 Research Team in Smart Communications-ERSC–Research Centre E3S, EMI. Mohamed V University,
Rabat 10000, Morocco; [email protected]
2 Integrated Management Coastal Research Institute, Universitat Politecnica de Valencia,
46370 Valencia, Spain; [email protected] (J.L.); [email protected] (S.S.)
3 University of Granada, 18014 Granada, Spain; [email protected]
* Correspondence: [email protected]

Received: 19 August 2019; Accepted: 17 October 2019; Published: 21 October 2019 

Abstract: Living longer and healthier is the wish of all patients. Therefore, to design effective solutions
for this objective, the concept of Big Data in the health field can be integrated. Our work proposes
a patient monitoring system based on Internet of Things (IoT) and a diagnostic prediction tool for
diabetic patients. This system provides real-time blood glucose readings and information on blood
glucose levels. It monitors blood glucose levels at regular intervals. The proposed system aims to
prevent high blood sugar and significant glucose fluctuations. The system provides a precise result.
The collected and stored data will be classified by using several classification algorithms to predict
glucose levels in diabetic patients. The main advantage of this system is that the blood glucose level
is reported instantly; it can be lowered or increased.

Keywords: Internet of Things; Big Data; healthcare; machine learning; diabetes; blood glucose

1. Introduction
The presence of Internet of Things (IoT) technology is growing in several important technical areas
like healthcare, smart houses, etc., and nowadays these applications are more and more accessible,
available, and versatile, and allow the integration of the interconnected objects. The most important
step in the field of intelligent health care is the quality of life of patients. For this reason, it is more
important to build a new application in this field [1]. Daily mobile healthcare service is becoming more
and more important. Chronic diseases influence the health of the people living with them, such as
cardiovascular and diabetic diseases [2,3]. From patient data, analyses can be used to identify people
who need “proactive care” or those who need a lifestyle change to avoid a deterioration in their health
status. Patients do not have a problem giving away part of their privacy if this can help to save their
lives or other people’s lives. “If having more information about me enables me to live longer and be
healthier”, said Marc Rotenberg of the Electronic Privacy Information Center, "then I do not think I am
going to object. If having more information about me means my insurance rates go up, or that I’m
excluded from coverage or other things that might adversely affect me, then I may have a good reason
to be concerned” [4].
Diabetes is a dangerous disease that can affect humans. Many deaths in the worlds are caused by
diabetes, and most people are not yet aware of its danger. In addition, diabetes has occurred when
an increase or a decrease in the level of glucose in the blood emerges. Therefore, it is necessary to
keep it stable at a precise interval [5]. The growth of diabetic patients increased the use of continuous
glucose monitoring devices (CGM), which are becoming the new method of continuous monitoring.
They provide real-time information about the glucose level, which is updated every five minutes [6].

Appl. Sci. 2019, 9, 4459; doi:10.3390/app9204459 www.mdpi.com/journal/applsci


Appl. Sci. 2019, 9, 4459 2 of 15

A glucose concentration value ≤70 mg/dL is defined as hypoglycemic and a glucose concentration
value ≥180 mg/dL is defined as hyperglycemic. Periodic blood glycemic checks and consultation by
medical experts is very important for patients. Then, to give an end to all these difficulties, a mobile
blood glycemic device is required to send the glucose value to the medical experts. In other words,
with the help of a tele-monitoring application, the problem can be solved. The tele-monitoring platform
is based on SMS services via the GSM network that can be widely accessible.
In this paper, a smartphone-based wireless blood glucose monitoring system is developed.
The measurement of blood glucose will be sent to the mobile phone through the wireless communication
protocol (Bluetooth, Wi-Fi, Zigbee, RF). After that, the given information will be shared on a mobile or
a web application. The purpose of this paper is to discuss the implementation of a digital blood glucose
meter system integrated with the wireless network for monitoring a patient’s glucose level in real-time.
The patient can do the measurements by himself/herself at any place; the glucose level sensor will
automatically send the data to the medical experts via SMS (Short Message Service). This application
is firstly designed to help diabetic patients; secondly it is to provide periodic communication with
the medical expert; and finally, it is intended for certain emergency cases and real-time applications.
In addition to all these benefits, the medical expert could often monitor the patient’s health remotely
and provide early treatment if something happened to the patient. A healthcare data analytics system
can help patients avoid several serious health problems, and can greatly influence the cost of patients
for individual treatment [7].
The main contents of this paper are organized as follows; Section 2 resumes the description
of current research on the application of blood glucose level measurement for diabetics. Section 3
describes the basic theory of the digital blood glucose meter, e-health module, and GSM module.
Section 4 presents a description of the system implementation. Section 5 provides a brief description of
the result discussed. Finally, a conclusion and future works are given in Section 6.

2. Related Work
This section presents some of the existing recent work related to e-health and monitoring glucose
for diabetic patients.
Islam et al. [8] presented a survey in IoT-based health care technologies and reviewed the
state-of-the-art network architectures/platforms, applications, and industrial trends in IoT-based health
care solutions. Lloret et al. [9] presented an intelligent communication architecture for ambient assisted
living (AAL). The process of artificial intelligence was used to gather the information from several
types of communication and showed the main intelligent algorithms included in the AAL system;
furthermore, a software application was developed. Finally, they used several real measurements to
validate their proposal operation.
Monteiro et al. [10] presented in progress e-health architecture using IoT for data acquisition,
fog for data pre-processing and short-term storage, and cloud for data processing, analyze and
long-term storage. This work also describes the main challenges to provide an e-health application
with high availability, high performance, and accessibility, at low deployment and maintenance cost.
Xiao et al. [11] proposed real-time glucose monitoring for an electrochemical sensor based on a wireless
system. A simple sensor tag with low power and low-cost solutions were contained in the implanted
glucose monitoring application. The accurate results provided by the system and its use of real-time
application were the advantages.
Wang and Lee [12] worked on development of a new blood glucose sensor. This sensor had the role
of controlling and monitoring the level of glucose for diabetic patients. The real-time measurement of
the blood glucose level was measured by a continuous glucose monitoring system (CGMS). This method
used an alarm to indicate the level of the glycemic event as well as to improve the quality of life.
Ahmed [13] designed a system for glucose concentration prediction of diabetic patients to avoid
hypoglycemia or hyperglycemia of serious complications. They used GlucoSim software to analyze
the information of the patients. It was generated by the continuous glucose monitoring system
Appl. Sci. 2019, 9, 4459 3 of 15

(CGMS), which adopted a Kalman Filter (KF) to reduce noise. In [14] Siddiqui et al. presented a
comprehensive survey on non-invasive/pain-free blood glucose monitoring methods from the five year
period, 2012–2016. The devices manufactured or being manufactured for non-invasive monitoring
were also compared in this paper. Giancarlo et al. [15] proposed a system architecture, Body Cloud,
that integrates BSN services with a cloud computing infrastructure. This architecture supports the
storage and management of sensor data streams and the processing (online and offline analysis) of the
stored data using software services hosted in the cloud.
In our paper, we propose an IoT application based patient monitoring system and diagnostic
prediction tool for diabetic patients. Most people with diabetes die because they do not receive
appropriate medical care at the right time. The development in the field of sensors and the Internet of
Things helps to constantly monitor the health parameters of patients. For those reasons, we use a simple
sensor with low power and low-cost solutions for the glucose monitoring application. The patient’s
data is updated in the cloud every day. The collected data is used by the doctor to monitor the patient’s
blood glucose variation visually and protect the patient’s health from a critical condition. With the
help of sensors, the current health parameters of patients are collected and forwarded to the cloud for
storage. Each health dataset is analyzed and verified to determine precisely if the current values are
within the normal range or not. An SMS is sent to notify the doctor in the case of any change in the
vital signs. The critical data is then sent directly to the prediction system. The system will consider this
data as trial data and predict whether or not the patient has a high risk of stroke. The prediction is
used with a Decision Tree algorithm (one of the complex algorithms in the fields of pattern recognition
and data mining, which is not only related to databases, artificial intelligence, and other disciplines but
has a great theoretical research value). This method can be improved to increase the accuracy value.
We use also the naïve Bayes classifier called Bayesian Classification (a statistical classification method
that can be used to predict the probability of membership of a class). The naïve model is developed
by using the classifications of algorithms in machine learning. Different classification algorithms are
analyzed for this model; the one that gives the best accuracy is considered for the proposed system.
Ensemble algorithms gave better accuracy for the prediction.
The prediction system used in our application provides a good result for the first time and is used
in a real-time application.

3. Proposal Description
This section presents a detailed description of the proposed blood glucose monitoring system.
The aim of this project is to monitor the blood glucose level of the diabetic patient. The measured data
is updated in the cloud every day. This collected data is used by the doctor or another medical expert
to monitor the patient’s blood glucose variation visually and send the response in real-time to protect
the patient’s health from a critical condition.
The designed blood glucose monitoring system consists of three distinct subsystems (Figure 1).
The first is dedicated to capturing glucose level in the blood with the glucose sensor. This sensor captures
the level of glucose in the blood, displays its exact value, and transmits it via the communication module
(Bluetooth, Wi-Fi, 4G) to the Android mobile phone. This is necessary because current mobile phones
do not include means of direct interface with the analog signals of the outside world. The second
subsystem includes the storage and data processing service received by the smartphone. The third
subsystem is data analysis by domain specialists and decision-making.
For a better diabetes management strategy, the glucose sensor will provide the diabetic patient
and health professionals with the necessary information about diabetes. The monitoring of the blood
glucose levels can help to reduce a person’s risk with a range of diabetes-related complications.
Structured self-monitoring involves checking the blood glucose levels at certain times of the day for a
given period (i.e., two weeks), and then working with the diabetes healthcare team to determine how
food, physical activity, and treatment have an impact on the blood glucose levels.
Appl. Sci. 2019, 9, x FOR PEER REVIEW 4 of 15

Appl. Sci. 2019, 9, 4459 4 of 15


Appl. Sci. 2019, 9, x FOR PEER REVIEW 4 of 15

Figure 1. Proposed scenario.

4. Patient Monitoring Elements Figure 1. Proposed scenario.

4. Patient Monitoring Elements Figure 1. Proposed scenario.


4.1. E-Health Sensor Shield
4. Patient
4.1. E-HealthMonitoring
Sensor Shield Elements
The e-health sensor shield can be connected to an Arduino board for all electronic projects
requiring the use of reliable biometric measurements. It provides information collected from nine
4.1. The e-health
E-Health Sensor sensor
Shieldshield can be connected to an Arduino board for all electronic projects
different biometric sensors.
requiring the use of reliable biometric By collecting an extensiveIt set
measurements. of biometric
provides information measures,
collectedonefrom
can nine
then
The e-health
analyze biometric
different sensor
this data, sensors.
either as shield
Bypart can be connected
of a medical
collecting an extensive to an
diagnosis, Arduino board
or for monitoring
set of biometric for
measures, one all electronic
in real-time, projects
or for
can then analyze
requiring
gathering
this the use
data
data, either as of
forpart reliable
later biometric
of aanalysis.
medical The measurements.
data
diagnosis, collected It provides
can
or for monitoring information
be transmitted
in real-time, via
or forthecollected
shield’sfrom
gathering nine
various
data for
different
interfaces biometric
(Wi-Fi, GPRS, sensors. By
Bluetooth, collecting
and 3G,an extensive
802.15.4 or set of
ZigBee). biometric
It is
later analysis. The data collected can be transmitted via the shield’s various interfaces (Wi-Fi, GPRS,usedmeasures,
for a one can
communication then
analyze between
interface
Bluetooth, this
and data,
3G,the either
sensors
802.15.4 as (Blood
or part ofPressure
ZigBee). aIt medical
meter)
is used diagnosis,
for aand or for monitoring
an Arduino
communication board. in real-time,
interface between or for
the sensors
gathering
(Blood datameter)
Pressure for laterandanalysis.
an Arduino Theboard.
data collected can be transmitted via the shield’s various
interfaces
4.2. (Wi-Fi,
Digital Blood GPRS,
Glucose Bluetooth, and 3G, 802.15.4 or ZigBee). It is used for a communication
Meter
4.2. Digitalbetween
interface Blood Glucose Meter (Blood Pressure meter) and an Arduino board.
the sensors
Each patient requires a different blood glucose testing approach for their diabetes, and some
Each to
will need patient requires
test blood a different
glucose blood glucose
more regularly testing The
than others. approach for theirofdiabetes,
measurement and some
blood glucose is a
4.2. Digital Blood Glucose Meter
will needof
measure tothetestlevel
blood glucose more
of glycemia in theregularly
blood usingthanan others. The device
electronic measurement
called a of blood
blood glucose
glucose is a
meter.
To do Each
measure this, patient
of the levelrequires
patient of pricks
glycemiaatheir
different blood
in fingertip
the blood glucose
using
with testing
an electronic
a small needle approach
device
and foratheir
called
places diabetes,
a blood
drop glucose
of blood and asome
onmeter.
test
Towill
do need
this, to
the test blood
patient glucose
pricks theirmore regularly
fingertip with than
a others.
small needleTheandmeasurement
places
strip. The strip is inserted into the blood glucose meter. The digital display shows the blood sugar a drop of blood
of blood glucose
on a is a
test
measure
strip.
level shortly of
The strip the level of
is inserted
afterward. glycemia
intoisthe
There in the
blood
a wide blood using
glucose
variety an
of meter. electronic
The digital
blood glucose device
meters called
display
on the a
shows blood
market. glucose
theSome meter.
bloodmeters
sugar
Todesigned
level
are do this, the
shortly forpatient
ease of pricks
afterward. There their
is
use, others fingertip
a wide
for ofwith
variety
ease a small
of blood
transport orneedle
glucose and places
meters
connectivity, on the
and astill
drop
market. of blood
others Some on a test
meters
incorporate
strip.
are The
designed strip
for is
easeinserted
of use, into the
others blood
for ease glucose
of meter.
transport orThe digital
connectivity,
more advanced technology such as USB software or multi-strip testing. Figure 2 shows the Blood display
and shows
still othersthe blood sugar
incorporate
leveladvanced
more
Glucose shortly
Meter.afterward.
technology There
such is as
a wide
USB variety
software of or
blood glucose testing.
multi-strip meters on the market.
Figure 2 showsSome meters
the Blood
are designed
Glucose Meter.for ease of use, others for ease of transport or connectivity, and still others incorporate
more advanced technology such as USB software or multi-strip testing. Figure 2 shows the Blood
Glucose Meter.

Figure 2. Digital blood glucose sensor.

4.3. GSM Modem


Figure 2. Digital blood glucose sensor.

4.3. GSM Modem


Appl. Sci. 2019, 9, 4459 5 of 15
Appl. Sci. 2019, 9, x FOR PEER REVIEW 5 of 15
Appl. Sci. 2019, 9, x FOR PEER REVIEW 5 of 15
4.3. GSM Modem
The GSM module is a compatible Arduino interface card equipped with a SIM card, which
The GSM module is a compatible Arduino interface card equipped with a SIM card, which
connects to
The to
GSM the telephone is network as a mobile phone that has
cardits own phone number
a SIMand operates
connects the module
telephone a compatible
network Arduino
as a mobile interface
phone that has itsequipped
own phone withnumber card,
and which
operates
anywhere
connects tointhethe world where
telephone networkthere
as aismobile
a GSM cellular
phone that network.
has its ownThephone
GSMnumber
moduleand enables the
operates
anywhere in the world where there is a GSM cellular network. The GSM module enables the
Arduino
anywhere board connected
in theconnected
world where to a mobile network to send and receive SMS either in the form of text or
Arduino board to athere is anetwork
mobile GSM cellular network.
to send The GSM
and receive SMSmodule
either inenables
the formtheofArduino
text or
in the
board PDU format.
connected The
to aThe process
mobile of
networksending and
to send andreceiving an
receive SMS SMS on
either a Wavecom modem uses an AT
in the PDU format. process of sending and receiving an SMS on in the form ofmodem
a Wavecom text or uses
in thean
PDU
AT
command.
format. TheFigure
process3 shows
of the GSM
sending and modem with
receiving an External
SMS on aAntenna.
Wavecom modem uses an AT command.
command. Figure 3 shows the GSM modem with External Antenna.
Figure 3 shows the GSM modem with External Antenna.

Figure 3. GSM modem.


Figure 3. GSM modem.
4.4. Arduino
4.4. Arduino Card
Card
4.4. Arduino Card
An Arduino
An Arduinoboard boardis is
an an
electronic cardcard
electronic that can
thatbecanprogrammed to analyze
be programmed and produce
to analyze and electrical
produce
An Arduino
signal, to signal, board
performtoaperform is
variety of an electronic
tasks such card
as home that can be
automation, programmed to
driving a robot, analyze
embedded and produce
electrical a variety of tasks such as home automation, driving a robot, computing,
embedded
electrical
etc. It is asignal,
platformto perform onaavariety of tasks such as home automation,
addition,driving a robot, embedded
computing, etc. It isbased
a platform simple input/output
based on interface.
a simple input/output Ininterface. Arduino
In cards
addition, have
Arduino serial
cards
computing, etc. interfaces,
communication It is a platform baseda on
including a simple
universal input/output
serial bus (USB) interface.
on some In addition,
models, whichArduino
are alsocards
used
have serial communication interfaces, including a universal serial bus (USB) on some models, which
have
to load serial communication interfaces, including a universal serial bus (USB) on some models, which
are alsoprograms
used to loadfrom personalfrom
programs computers.
personal Figure 4 shows
computers. the Arduino
Figure 4 showsUno card.
the Arduino Uno card.
are also used to load programs from personal computers. Figure 4 shows the Arduino Uno card.

Figure 4. Arduino card.


Figure 4. Arduino card.
5. Implementation
5. Implementation
5. Implementation
This section
This sectiondescribes
describesinin
detail the the
detail implementation
implementationof ourofproposed systemsystem
our proposed including the scheme,
including the
This
system section
illustration,describes
hardware, in detail
and the
software implementation
installation. of our proposed system including the
scheme, system illustration, hardware, and software installation.
scheme,
Thesystem illustration,
flowchart of the hardware,
the system and software the
in Figure installation. system from the measurement of
The flowchart of system in Figure 55 shows
shows the complete
complete system from the measurement of
Thelevel
flowchart of the system in final
Figure 5 shows the complete system from the measurement of
glucose level in the patient until the final decision of the doctor.
glucose in the patient until the decision of the doctor.
glucose level in the patient until the final decision of the doctor.
In this system, we describe the general scheme of the proposed system (Figure 6). The patient
In this system, we describe the general scheme of the proposed system (Figure 6). The patient
can perform a measurement of blood glucose using the blood glucose sensor. After the
can perform a measurement of blood glucose using the blood glucose sensor. After the
measurement, the results of the glucose level in the blood will be obtained for the patient. The
measurement, the results of the glucose level in the blood will be obtained for the patient. The
measurement data is automatically transmitted by the blood glucose sensor that is connected in
measurement data is automatically transmitted by the blood glucose sensor that is connected in
serial mode with the Arduino card. The data processed by the Arduino card’s microcontroller is
serial mode with the Arduino card. The data processed by the Arduino card’s microcontroller is
Appl. Sci. 2019, 9, x FOR PEER REVIEW 6 of 15

automatically transmitted to the GSM modem that has been integrated into the Arduino board to
send
Appl. Sci.the measurement
2019, results to a specialist doctor via SMS
9, 4459 6 of 15

Appl. Sci. 2019, 9, x FOR PEER REVIEW 6 of 15

automatically transmitted to the GSM modem that has been integrated into the Arduino board to
send the measurement results to a specialist doctor via SMS

Figure 5. Flow chart of the system.


Figure 5. Flow chart of the system.
In this system, we describe the general scheme of the proposed system (Figure 6). The patient
can perform a measurement of blood glucose using the blood glucose sensor. After the measurement,
the results of the glucose level in the blood will be obtained for the patient. The measurement data
is automatically transmitted by the blood glucose sensor that is connected in serial mode with the
Arduino card. The data processed by the Arduino card’s microcontroller is automatically transmitted
to the GSM modem that has been integrated into the Arduino board to send the measurement results
to a specialist doctor via SMS. Figure 5. Flow chart of the system.

Figure 6. Illustration of blood glucose measurement.

5.1. Hardware Installation


The general scheme of the proposed system is achieved by connecting the blood glucose level
sensor with the e-health shield and the Arduino board. The Arduino board is also connected to the
GSM module with a TTL (Transistor-Transistor Logic) to RS232 converter. Data rates for serial
communication between Figure 6. Illustration of blood
the microcontroller, glucose and
the sensor, measurement.
the GSM module have a value of
115,200 bps. In addition, Figure
the type6. Illustration of blood glucose
of data transmitted in the measurement.
program must be also set to synchronize
5.1. Hardware Installation
the transmitter and the receiver. Figure 7 shows the global hardware installation.
5.1. Hardware Installation
The general scheme of the proposed system is achieved by connecting the blood glucose level
sensorThe general schemeshield
with the e-health of theand the Arduino
proposed board.
system The Arduino
is achieved board is also
by connecting theconnected to the level
blood glucose GSM
modulewith
sensor withthe
a TTL (Transistor-Transistor
e-health Logic) to board.
shield and the Arduino RS232 converter.
The ArduinoDataboard
rates for serial
is also communication
connected to the
between
GSM the microcontroller,
module the sensor, and the GSM
with a TTL (Transistor-Transistor module
Logic) have a converter.
to RS232 value of 115,200
Data bps.
ratesInfor
addition,
serial
communication between the microcontroller, the sensor, and the GSM module have a value the
the type of data transmitted in the program must be also set to synchronize the transmitter and of
receiver.bps.
115,200 Figure 7 shows the
In addition, the type
globalofhardware installation.
data transmitted in the program must be also set to synchronize
the transmitter and the receiver. Figure 7 shows the global hardware installation.
Appl.
Appl. Sci.
Sci. 2019,
2019, 9,
9, x4459
FOR PEER REVIEW 77 of
of 15
15
Appl. Sci. 2019, 9, x FOR PEER REVIEW 7 of 15

Figure
Figure 7.
7. Hardware
Hardware installation.
installation.
Figure 7. Hardware installation.
5.2. Software
5.2. Software Installation
Installation
5.2. Software Installation
The measurement
The measurementdata datafrom
from thethe
sensors
sensors are are
sentsent
via the
viaserial data todata
the serial the Arduino shield e-health.
to the Arduino shield
The
Finally, measurement
the serial data isdata from
processed the
by sensors
the are sent
microcontroller via
of the
the serial
Arduino data
e-health. Finally, the serial data is processed by the microcontroller of the Arduino board andGSM
boardto the
and Arduino
sent via shield
the sent
e-health.
modem.
via Finally,
Themodem.
the GSM the serial
processed The data
data
processedis processed
is then sent
datatoisthe bydoctor
then the
sentmicrocontroller
via
to the
the viaofthe
SMS service.
doctor theSMS
Arduino
The data board
sent
service. and
datasent
is displayed
The sent
via
and
is the GSM modem.
processed
displayed and theThe processed
by processed
doctor thedata
to make
by is then
a decision
doctor sent
to make toathe
about doctor
each via the
patient.
decision about TheSMS service.
Arduino
each The
The data
program
patient. ofsent
Arduinoour
isprogram
displayed
application and
is processed
shown in Figureby 8.the doctor
of our application is shown in Figure 8. to make a decision about each patient. The Arduino
program of our application is shown in Figure 8.

Figure 8. Coding
Coding for
for the
the reading
reading of
of the
the sensor.
Figure 8. Coding for the reading of the sensor.
Appl. Sci. 2019, 9, 4459 8 of 15

6. Classification Data in Healthcare


Classification is a type of supervised learning that consists of classifying data into a category.
Classification involves predicting a certain outcome based on a given input. In order to predict the
results, it needs to fetch the data already available. There are several classification models, namely,
decision tree, ripper rule, neural networks, naïve Bayes, k-nearest neighbors, and support vector
machine. In this section, we present the decision tree algorithm, naïve Bayes algorithms, random forest
algorithms, and neural networks.
In [11], the authors used classification techniques to find out patterns from the diabetes data sets.
They employed naïve Bayes and decision tree algorithms by using the Weka tool. For the analysis of
diabetic data, many authors preferred the decision tree for the classification. In this work, we are using
naïve Bayes, random tree, ZeroR, and J48 classification algorithms from the diabetes data set to test the
most powerful to determine the patient’s level of risk.

6.1. Decision Tree


A decision tree is a widely used classification technique. The decision tree is one of the classification
techniques in which classification is done by the splitting criteria.
There are many related works in the literature about classification data with the decision tree
algorithm. Kumari et al. [16] used a decision tree to predict cardiovascular disease, and they classified
and diagnosed the patients. Al-Radaideh et al. [17] applied a decision tree method to predict the grades
of students. Even though various classification algorithms were applied to the same, decision trees
gave better results.

6.2. Naïve Bayes


The naïve Bayes classifier is a simple probabilistic classifier based on applying Bayes’ theorem
with strong (naïve) independence assumptions. The approach used in naïve Bayes classifier is very
simple. The advantage of the naïve Bayes classifier is that with the help of a small amount of training
data, it is possible to classify the given instances [18].

6.3. Random Forest


Random Forest is a machine-learning algorithm; it is a flexible and easy-to-use algorithm that
produces, even without hyper-parameter settings, an optimal result most of the time. It is also one of
the most used algorithms because of its simplicity and the fact that it can be used for both classification
and regression tasks, because with random forest, one can also handle task regression using the
random forest regressor. Random forest has almost the same parameters as a decision tree. In the
field of health care, it is used to identify the correct combination of components in medicine and to
analyze a patient’s medical history to identify diseases. Finally, in e-commerce, random forest is used
to determine whether a customer will really appreciate a product or not.
The data measured by the glucose sensor are processed by the Arduino card and sent directly to
the patient’s smartphone via Wi-Fi or 4G, which in turn sends these data daily to the cloud and to the
smartphone of the doctor. The monitoring center has the right to access data from the cloud via local
connection. Table 1 shows the value of glucose levels measured with the glucose sensor and processed
by the Arduino Card into 15 days for one diabetic patient with an average of two times per days.
Appl. Sci. 2019, 9, 4459 9 of 15

Table 1. Glucose measurement.

Day Morning Evening


1 1.34 0.78
2 2.43 0.87
3 1.11 1.02
4 2.45 0.55
5 0.88 1.43
6 1.00 0.78
7 0.99 1.34
8 1.32 1.03
9 1.09 1.01
10 1.34 1.22
11 0.89 0.87
12 1.22 1.15
13 1.41 1.33
14 1.06 0.94
15 0.91 1.05

7. Result and Discussion


In this section, we show and discuss the test results of our proposed system; the plan for this
research is to evaluate the performance of methods for classifying diabetes data. The data is evaluated
using the J48, naïve Bayes, RandomTree, and ZeroR algorithms. We used a dataset that included
30 patients for a total of 30 days: 23 men and 7 women aged 40 to 60 years. The dataset used for the
purpose of analysis had a total of 2700 instances, in which there were 2070 instance of men detected
and 630 of women detected. The format of this dataset contains five columns designated by date,
day, glucose level, and request. This research work deals mainly with the accuracy of classification
algorithms with respect to execution time and error rate with WEKA software [19]. To classify diabetes
data appropriately from the calculation dataset, error rates and accuracy are calculated using classifiers.
The results of various measurements are given in Table 2.

Table 2. The accuracy level.

Algorithms Correctly Classified Instances Incorrectly Classified Instances


Naïve Bayes 91.8301% 8.1699%
RandomTree 99.6732% 0.3268
ZeroR 69.6078% 30.3922
J48 99.3464 0.6536%

This section of the paper focuses on predicting the possible number of diabetic patients from the
dataset using data classification techniques and determining which model gives the highest percentage
of correct predictions for the diagnoses. These techniques are required for prediction of diabetes
in patients.
This research has the major goal of predicting the number of diabetics and comparing the best
available methods of prediction. Therefore, we can determine what attribute is the best predictor for
the correct prediction of the diagnoses, and we can help experts to predict possible diabetic attacks
from the patient datasets.
From the test results, as shown in Table 1, it can be stated that the measurement data were
successfully sent. Among 20 times of testing, the range of delay between transmitting and receiving
SMS was from 22 to 91 s, and the average was 32.17 s. Figure 9 shows a graph of the measurement of
the level of glucose in the blood.
Appl.
Appl. Sci. 2019,9,
Sci. 2019, 9,4459
x FOR PEER REVIEW 10
10of
of15
15
Appl. Sci. 2019, 9, x FOR PEER REVIEW 10 of 15

Figure 9. Measurement of the level of glucose in the blood.


Figure 9. Measurement of the level of glucose in the blood.
Figure 9. Measurement of the level of glucose in the blood.
The test of the dataset was analyzed by the use of four algorithms classification, which were
The test of the dataset was analyzed by the use of four algorithms classification, which were the
The test
the naïve of the
Bayes, dataset
J48, ZeroR,was
andanalyzed by the(using
RandomTree use oftraining
four algorithms classification,
set). In addition, which were
a comparison of the
naïve Bayes, J48, ZeroR, and RandomTree (using training set). In addition, a comparison of the
naïve
accuracyBayes,
of allJ48, ZeroR, was
classifiers and done
RandomTree (using
and finally, training
it was set). Inthat
investigated addition, a comparison
the RandomTree of the
technique
accuracy of all classifiers was done and finally, it was investigated that the RandomTree technique
accuracy ofbetter
performed all classifiers
with an was done of
accuracy and finally, itThe
99.6732%. wasaccuracy
investigated
level that
of allthe
theRandomTree
algorithms istechnique
given in
performed better with an accuracy of 99.6732%. The accuracy level of all the algorithms is given in
performed
Table 2. better with an accuracy of 99.6732%. The accuracy level of all the algorithms is given in
Table 2.
TableAs 2. seen in Table 2, the comparison between the algorithms like ZeroR, RandomTree, J48, and naïve
As seen in Table 2, the comparison between the algorithms like ZeroR, RandomTree, J48, and
BayesAs forseen in Table 2,
the correctly the comparison
classified instancesbetween
was higher thethan
algorithms like ZeroR,
the incorrectly RandomTree,
classified instances J48, and
in terms
naïve Bayes for the correctly classified instances was higher than the incorrectly classified instances
naïve Bayes Figure
of accuracy. for the 10correctly
shows aclassified
bar graphinstances was higher
that represents than and
correctly the incorrectly ranked
classified instances
instances of
in terms of accuracy. Figure 10 shows a bar graph that represents correctly and incorrectly ranked
in
theterms of accuracy.
algorithms used. Figure 10 shows a bar graph that represents correctly and incorrectly ranked
instances of the algorithms used.
instances of the algorithms used.

Figure 10.
Figure 10. The
The graph
graph of
of correctly
correctly and
and incorrectly
incorrectlyclassified
classifiedinstances
instancesof
ofalgorithms.
algorithms.
Figure 10. The graph of correctly and incorrectly classified instances of algorithms.
Figure
Figure1111shows
showsthe
thetime
timegraph
graphof ofvarious
variousclassification
classificationalgorithms.
algorithms. The
The longest
longest time
time was
was taken
taken
Figure 11 shows the time graph of various classification algorithms. The longest time was taken
by
by ZeroR
ZeroR consuming
consuming aa time
time of
of 0.05
0.05 ss and
and the
the shortest
shortest time
time was
was taken
taken by
by RandomTree
RandomTree consuming
consuming
by ZeroR consuming a time of 0.05 s and the shortest time was taken by RandomTree consuming
0.01
0.01 ssonly.
only.
0.01 s only.
Appl. Sci. 2019, 9, x FOR PEER REVIEW 11 of 15
Appl. Sci. 2019, 9, 4459 11 of 15
Appl. Sci. 2019, 9, x FOR PEER REVIEW 11 of 15

Figure 11. The graph for training time results for the top four classifiers.
Figure 11. The graph for training time results for the top four classifiers.
Figure 11. The graph for training time results for the top four classifiers.
Figure 12 represents Kappa statistic, MAE (mean absolute error), and RMSE (root mean
Figure 12 represents Kappa statistic, MAE (mean absolute error), and RMSE (root mean squared
squared error)
Figure 12 values for the
represents chosenstatistic,
Kappa classifiers.
MAE The(mean
naïve Bayes algorithm
absolute error), showed
and RMSE better(root
results
meanfor
error) values for the chosen classifiers. The naïve Bayes algorithm showed better results for MAE and
MAE and RMSE, and the J48 algorithm showed a better value for the Kappa statistic.
squared error) values for the chosen classifiers. The naïve Bayes algorithm showed better results for
RMSE, and the J48 algorithm showed a better value for the Kappa statistic.
MAE and RMSE, and the J48 algorithm showed a better value for the Kappa statistic.

Figure 12. KAPPA


Figure 12. KAPPA statistics
statistics and
and error
errorrate
ratevalues.
values.
Figure 12. KAPPA statistics and error rate values.
Figure
Figure1313shows
showsthe decision
the tree
decision built
tree by the
built by classifier, which
the classifier, includes
which the root
includes thenodes, child nodes,
root nodes, child
and leaf
nodes, nodes
and leaf
Figure with their
nodes the
13 shows possible/predicted
withdecision values.
their possible/predicted
tree built by the values.
classifier, which includes the root nodes, child
nodes, and leaf nodes with their possible/predicted values.
Appl. Sci. 2019, 9, x FOR PEER REVIEW 12 of 15
Appl. Sci. 2019, 9, 4459 12 of 15
Appl. Sci. 2019, 9, x FOR PEER REVIEW 12 of 15

Figure 13. Visualized tree with random tree.


Figure 13. Visualized tree with random tree.
Figure 13. Visualized tree with random tree.
Figure1414represents
Figure representsTPTPRate,
Rate,FP
FPRate,
Rate,Precisions,
Precisions,Recall,
Recall,and
andF-Measured
F-Measuredfor
forthe
thenaïve
naïveBayes
Bayes
algorithm,
algorithm, Random
FigureRandom Tree,
14 represents ZeroR and
TP Rate,
Tree, ZeroR andFP J48.
Rate, Precisions, Recall, and F-Measured for the naïve Bayes
J48.
algorithm, Random Tree, ZeroR and J48.

Figure 14. Graphical representation of false positive (FP), true positive (TP), precision, recall,
andFigure
F-measure of different
14. Graphical algorithms. of false positive (FP), true positive (TP), precision, recall, and
representation
F-measure of different algorithms.
InFigure 14. Graphical
the above section, representation of false
all the rules were positive (FP),
interpreted. true positive
These (TP),visualized
rules were precision, recall,
in the and
tree form.
F-measure of different algorithms.
Tree visualization is the simplest method to understand the conditions and their results.
In the above section, all the rules were interpreted. These rules were visualized in the tree form.
The performance of the proposed classification approach was evaluated using different standard
TreeInvisualization is the simplest
the above section, method
all the rules wereto understandThese
interpreted. the conditions
rules wereand their results.
visualized in the tree form.
measures based on true positive (TP), false positive (FP), precision, recall, and F-measure [20].
The performance of the proposed classification approach was
Tree visualization is the simplest method to understand the conditions and their results. evaluated using different
The accuracy of algorithms (shown in Table 3 and Figure 13) was measured with the help of
standard measures based
The performance of on
the true positiveclassification
proposed (TP), false positive
approach (FP),was
precision,
evaluatedrecall,using
and F-measure
different
parameters such as false positive rate, true positive rate, recall, precision, and F-measure. These
[20].
standard measures based on true positive (TP), false positive (FP), precision, recall, and F-measure
parameters are defined as follows:
[20]. The accuracy of algorithms (shown in Table 3 and Figure 13) was measured with the help of
•parameters
True such (TP):
The accuracy
positive as false positive
of algorithms
represents rate,
(shown
the true
in positive
Table
instances 3 and
that rate,
have recall,
Figure
been 13) precision,
was measured
correctly and with
classified F-measure.
with respect These
the helptoofa
parameters
parameters are defined as follows:
such as false positive rate, true positive rate, recall, precision, and F-measure. These
given class.
parameters
• • False are defined
positive
True positive (TP):as
(FP): follows: the
represents
represents theinstances
instances that have
that have been
beenincorrectly
correctly classified
classifiedwith
withrespect
respecttotoaa
• given
given
True class.
class. (TP): represents the instances that have been correctly classified with respect to a
positive
•• Precision:
Falseclass.
given the proportion
positive of thethe
(FP): represents correctly
instances classified
that have instances to a particular
been incorrectly class
classified divided
with respectbyto
• overall
a given
False instances classified
class.(FP):
positive withthe
represents respect to that
instances thatclass.
have been incorrectly classified with respect to
• aPrecision: the proportion of the correctly classified instances to a particular class divided by
given class.
overall instances classified Precision = TP/(TP + FP) (1)
• Precision: the proportion ofwith respect toclassified
the correctly that class.instances to a particular class divided by
overall instances classified with respect to that class.
Appl. Sci. 2019, 9, 4459 13 of 15

• Recall: the proportion of the incorrectly classified instances that have been classified by a class
divided by the total instances present in the class.

Recall = TP/(TP + FN) (2)

• F-Measure: it is calculated by combining the measure of recall and precision according to


Equation (3):
F-Measure = (2 * Precision * Recall)/(Precision + Recall), (3)

Table 3. Values of TP, FP, precision, recall, and F-measure for algorithms.

Algorithm TP Rate FP Rate Precision Recall F-Measure


Naïve Bayes 0.996 0.129 0.946 0.996 0.970
RandomTree 0.994 0.016 0.993 0.994 0.994
ZeroR 1 1 0.69 1 0.82
J48 0.993 0.010 0.996 0.993 0.994

Figure 13 represents TP rate, FP rate, precision, recall, and F-measure for the chosen classifiers.
The TP rate, precision, recall, F-measure values for J48 were better than the other classifiers, but the FP
Rate for ZeroR was better than the others.
According to the precedent equations, we can obtain the sensitivity, specificity, and accuracy of
different algorithms.

Specificity = TN/(TN + FP) (4)

Sensitivity = TN/(TP + FP) (5)

Accuracy = (TP + TN)/(TP + TN + FN + FP) (6)

Table 3 shows the value of TP Rate, FP Rate, Precision, Recall, F-Measure, and Table 4 shows
Sensitivity, specificity, and Accuracy for the Naïve Bayes algorithm, Random Tree, ZeroR and J48.

Table 4. Comparison of sensitivity, accuracy, and specificity.

Algorithm Sensitivity Specificity Accuracy


Naïve Bayes 0.36 0.87 0.95
RandomTree 0.42 0.99 0.99
ZeroR 0 0 0.69
J48 0.43 0.99 0.99

Figure 15 represents the sensitivity, specificity, and accuracy of different algorithms. The sensitivity,
specificity, and accuracy for J48 were better than for other classifiers.
Appl.
Appl. Sci.Sci. 2019,
2019, 9, 9, x FOR PEER REVIEW
4459 14 of
1415
of 15

Figure 15. Graphical representation of sensitivity, specificity, and accuracy of different algorithms.
Figure 15. Graphical representation of sensitivity, specificity, and accuracy of different algorithms.
8. Conclusions
8. Conclusions
As given in the paper, the real-time monitoring system for the diabetes condition is able to perform
As given in the paper, the real-time monitoring system for the diabetes condition is able to
with the function of the Internet of Things (IoT). The effectiveness of the personal diabetes monitoring
perform with the function of the Internet of Things (IoT). The effectiveness of the personal diabetes
via a mobile application database has been demonstrated. In addition to that, an implementation of the
monitoring via a mobile application database has been demonstrated. In addition to that, an
blood glucose measurement system for tele-monitoring is presented. Additionally, after several tests,
implementation of the blood glucose measurement system for tele-monitoring is presented.
theAdditionally,
evaluation resultaftershowed
severalthat the system
tests, could work
the evaluation appropriately
result showed that withthe
a delay of transmission
system could workless
than 32 s. The measured data was sent and received with a valid value
appropriately with a delay of transmission less than 32 s. The measured data was sent andby SMS. Finally, thereceived
proposed
prediction system was evaluated by several simulation experiments and the
with a valid value by SMS. Finally, the proposed prediction system was evaluated by several results demonstrated that
thesimulation
proposed model improved
experiments and the
theaccuracy of prediction. This
results demonstrated that model allows a model
the proposed preventive intervention
improved the
foraccuracy
a diabetic patient and controls the glucose.
of prediction. This model allows a preventive intervention for a diabetic patient and
The future
controls work aims to send the blood glucose reading over the cloud so that it can be accessed
the glucose.
from anyThelocation across
future work theto
aims globe.
send Additionally, a new
the blood glucose concept
reading overofthe
early
clouddetection
so that itiscan
planned in order
be accessed
to from
detectanythelocation
symptoms across the globe.
of other Additionally,
diseases that needaprompt
new concept of early In
intervention. detection
addition, is the
planned in
proposed
order to detect the symptoms of other diseases that need prompt intervention.
system of monitoring will be enhanced with the inclusion of a content management framework to In addition, the
proposed
obtain system
additional of monitoring
information aboutwill be enhanced
physical withcommunication
activity, and the inclusion of a content
with electronic management
health record
framework
(EHR) from thetohospital
obtain information
additional information
system to get about physical
relevant activity,such
information andascommunication
illness, treatments, withand
electronic health record (EHR) from the hospital information system to get
drugs. Moreover, we will study the performance of our system and include algorithms to predict the relevant information
such as illness,
connectivity of thetreatments,
devices inand thedrugs.
wirelessMoreover,
networkwe will study the performance of our system and
[21].
include algorithms to predict the connectivity of the devices in the wireless network [21].
Author Contributions: Methodology and supervision, J.L. and A.O.; formal analysis and investigation, A.R.,
L.P.Author Contributions:
and S.S.; Methodology
writing—original and supervision,
draft preparation, J.L. and A.O.; formal
A.R.; writing—review analysisA.R.
and editing, and and
investigation,
J.L. A.R.,
L.P., and S.S.; writing—original draft preparation, A.R.; writing—review and editing, A.R. and J.L.
Funding: This work has been partially supported by the “Ministerio de Economía y Competitividad” in the
“Programa
Funding:Estatal de Fomento
This work has been de la Investigación
partially supported Científica y TécnicadedeEconomía
by the “Ministerio Excelencia, Subprograma Estatal
y Competitividad” in the de
Generación
“ProgramadeEstatal
Conocimiento” within
de Fomento de la the project under
Investigación Grant yTIN2017-84802-C2-1-P.
Científica Técnica de Excelencia, Subprograma Estatal de
Generación
Conflicts de Conocimiento”
of Interest: within
The authors the no
declare project under
conflict Grant TIN2017-84802-C2-1-P.
of interest.
Conflicts of Interest: The authors declare no conflict of interest.
References
References
1. Rghioui, A.; Sendra, S.; Lloret, J.; Oumnad, A. Internet of Things for measuring human activities in ambient
assisted living and e-health. Netw. Protoc. Algorithms 2016, 8, 15–28. [CrossRef]
2. Zhang, Y.; Gravina, R.; Lu, H.; Villari, M.; Fortino, G. PEA: Parallel electrocardiogram-based authentication
for smart healthcare systems. J. Netw. Comput. Appl. 2018, 117, 10–16. [CrossRef]
Appl. Sci. 2019, 9, 4459 15 of 15

3. Ismail, W.N.; Hassan, M.M.; Alsalamah, H.A.; Fortino, G. Mining productive-periodic frequent patterns in
telehealth systems. J. Netw. Comput. Appl. 2018, 115, 33–47. [CrossRef]
4. Din, S.; Ghayvat, H.; Paul, A.; Ahmad, A.; Rathore, M.M.; Shafi, I. An architecture to analyze big data in
the Internet of Things. In Proceedings of the 9th International Conference on Sensing Technology (ICST),
Auckland, New Zealand, 8–10 December 2015.
5. Tabish, S.A. Is Diabetes Becoming the Biggest Epidemic of the Twenty-first Century? Int. J. Health Sci. 2007,
1, V.
6. Aboufadel, E.; Castellano, R.; Oslon, D. Quantification of the variability of continuous glucose monitoring
data. Algorithms 2011, 4, 16–27. [CrossRef]
7. Katon, W.J.; Rutter, C.; Simon, G.; Lin, E.H.; Ludman, E.; Ciechanowski, P.; Von Korff, M. The association
of comorbid depression with mortality in patients with type 2 diabetes. Diabetes Care 2005, 28, 2668–2672.
[CrossRef] [PubMed]
8. Islam, S.M.R.; Kwak, D.; Kabir, M.D.H.; Hossain, M.; Kwak, K.S. The Internet of Things for Health Care:
A Comprehensive Survey. IEEE Access 2015, 3, 678–708. [CrossRef]
9. Lloret, J.; Canovas, A.; Sendra, S.; Parra, L. A smart communication architecture for ambient assisted living.
IEEE Commun. Mag. 2015, 53, 26–33. [CrossRef]
10. Monteiro, K.; Rocha, É.; Silva, É.; Santos, G.L.; Santos, W.; Endo, P.T. Developing an e-Health System Based
on IoT, Fog and Cloud Computing. In Proceedings of the 2018 ACM International Conference on Utility and
Cloud Computing Companion, Zurich, Switzerland, 17–20 December 2018.
11. Xiao, Z.; Tan, X.; Chen, X.; Chen, S.; Zhang, Z.; Zhang, H.; Wang, J.; Huang, Y.; Zhang, P.; Zheng, L.; et al.
An implantable RFID sensor tag toward continuous glucose monitoring. IEEE J. Biomed. Health Inform. 2015,
19, 910–919. [CrossRef] [PubMed]
12. Wang, H.C.; Lee, A.R. Recent developments in blood glucose sensors. J. Food Drug Anal. 2015, 23, 191–200.
[CrossRef] [PubMed]
13. Ahmed, H.B.; Serener, A. Effects of External Factors in CGM Sensor Glucose Concentration Prediction.
Procedia Comput. Sci. 2016, 102, 623–629. [CrossRef]
14. Siddiqui, S.A.; Zhang, A.; Lloret, J.; Song, H.; Obradovic, Z. Pain-free blood glucose monitoring using
wearable sensors: Recent advancements and future prospects. IEEE Rev. Biomed. Eng. 2018, 11, 21–35.
[CrossRef]
15. Fortino, G.; Parisia, D.; Pirronea, V.; Di Fatta, G. BodyCloud: A SaaS approach for community Body Sensor
Networks. Future Gener. Comput. Syst. 2014, 35, 62–79. [CrossRef]
16. Kumari, M.; Godara, S. Comparative Study of Data Mining Classification Methods in Cardiovascular Disease
Prediction. Int. J. Comput. Sci. Technol. 2011, 2, 304–308.
17. AI-Radaideh, E.; AI-Shawakfa, W.; AI-Najjar, M.I. Mining student data using decision trees. In Proceedings
of the International Arab Conference on Information Technology, Irbid, Jordan, 19 December 2006.
18. Kanchan, B.D.; Kishor, M.M. Study of machine learning algorithms for special disease prediction using
principal of component analysis. Int. Conf. Glob. Trends Signal Process. Inf. Comput. Commun. 2016, 5, 5–10.
[CrossRef]
19. Hall, M.; Frank, E.; Holmes, G.; Pfahringer, B.; Reutem, P. The WEKA Data Mining Software: An Update.
ACM SIGKDD Explor. Newsl. 2009, 11, 10–18. [CrossRef]
20. Huda, S.; Yearwood, J.; Jelinek, H.F.; Hassan, M.M.; Fortino, G.; Buckland, M. A hybrid feature selection with
ensemble classification for imbalanced healthcare data: A case study for brain tumor diagnosis. IEEE Acess
2016, 4, 9145–9154. [CrossRef]
21. López-Martín, M.; Sánchez-Esguevillas, A.; Carro, B. Review of Methods to Predict Connectivity of IoT
Wireless Devices. Ad. Hoc. Sens. Wirel. Netw. 2017, 38, 125–141.

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access
article distributed under the terms and conditions of the Creative Commons Attribution
(CC BY) license (http://creativecommons.org/licenses/by/4.0/).

You might also like