Sei sulla pagina 1di 9

PENULISAN ILMIAH

Web-Based Expert System To Diagnose Heart And Lung Diseases Using Fuzzy Logic
And Certainty Factor
(International Journal of Knowledge-Based and Intelligent Engineering Systems)
(Website: http://www.iospress.nl/journal/international-journal-of-knowledge-based-and-intelligent-engineering-systems/ )

Oleh:
Erna Yulianti

(1104505008 )

RR.Siti Sarah Wulan A.Y.U (1104505044)


Tantony Hardiwinata

(1104505047)

Ni Kadek Ayu Anggraeni

(1104505050)

Ni Putu Sri Merta Suryani

(1104505060)

AA.Primaningrat Gita Puspita

(1104505066 )

JURUSAN TEKNOLOGI INFORMASI


FAKULTAS TEKNIK UNIVERSITAS UDAYANA
2015

Web-based expert system to diagnose heart and


lung diseases using fuzzy logic and certainty
factor
I Ketut Gede Darma Putraa*, I Putu Agung Bayupatib and Ni Kadek Ayu Anggraenic
abc
Information Technology, Faculty of Engineering, Udayana University, Bali, Indonesia
a
ikgdarmaputra@gmail.com, b bayupati@ee.unud.ac.id c ayuanggraeni122@gmail.com,
Abstract.The aim of this study is to design a web-based expert system for diagnosis of heart and lung diseases using
the combination of fuzzy logic and certainty factor methods. This system uses Sugeno inference method and
forward-backward chaining as the reasoning approach method. The developed expert system has 5 fuzzy input
variables namely body temperature, pulse rate, systolic blood pressure, body weight, and blood sugar. The results
obtained from designed expert system were compared with medical expert diagnosis and has similarity at 94.61%.
Keywords: Expert system, heart and lung diseases, fuzzy logic, certainty factor

1.

Introduction

Expert system allows the communication


between doctor and patient can be done
without limitation of distance and time. This
system able to provide solutions for some
problems which contain elements of
uncertainty to solve the similarity between
the symptoms of one to other diseases.
Capabilities provided by it, is a solution to
overcome the problems that often occur in
the process of patient management,
especially for people who live in the areas
with minimum specialist.
Cases in internal diseases such as
cardiovascular and pulmonary will be greatly
assisted by the expert system. The method for
diagnosis hearts illnessare using certainty factor
method. Cardiovascular illneswas classified into
25 types, left and right side of the heart failure
related
to
semantic
nerwork
[5][10].
Development of expert systems for diagnosis of
heart disease using Fuzzy Logic method have
attribute 11 input variables and one output
variable. The inference method is Mamdani
method and defuzifikasi method used is the
centroid method [1].
Some intelligent techniques as the Neural
Networks, the Fuzzy Logic, and Certainty Factor
[1-5] have been used to create expert system for
internal desease and infection. But,there is no
expert system for detection more than one

concentration of internal desease using


combination of 2 or moremethods.
Developing expert system can be done using
single method or more. But, to make the result
strongly sure, it should be done by combining
two or more methods.
Method of developing expert systems for
diagnosis disease can be made by combining the
method of Neural Network and Certainty Factor.
Models are constructed consisting of three
phases, each phase using a single network for the
learning process [6]. Development of expert
systems for diagnosis hepatitis B by comparing
the Fuzzy Inference System (FIS) and
AdaptiveNeuro-Fuzzy
Inference
System
(ANFIS) can be done with inference method
used in FIS, Mamdani, while the ANFIS Sugeno
[2].
Based on some studies, the paperis
concernedto use two methods. These can be used
and resolve problems that occur, either by using
the Fuzzy Logic method or by using Certainty
Factor, both fully can help resolve issues related
to expert systems, of excess and disadvantages of
each method. Therefore, the authors are
interested in developing an expert system for
diagnosing cardovascular and pulmonary desease
using Fuzzy Logic and Certainty Factor.
The first method, Fuzzy Logic method will
be used to deal with the uncertainty of the
symptoms experienced by patients and

methods.Then the second method, Certainty


factors will be used to address the inability of an
expert in defining the relationship between the
symptoms of the disease with certainty. The
implementation was trough seven stage, they are
data collection phase of the diseases,
fformulation stage of the diseases and its
symptoms, stage of the rule (the expert system
rule), database design phase, expert system
interface design, implementation of the design
phase into the expert system, and testing phase.
This expert system also provides improved
knowledge and explanations, which the expert
can add new knowledge to a disease or amend
existing knowledge on the disease, so that the
system will remain accurate and up to date.
2.

Research method

Types of diseases that were made as the


research objects are pneumonia, pulmonary
tuberculosis, asthma, COPD, lung cancer,
chronic heart failure, coronary heart disease,
hypertensive heart, heart valves, and congenital
heart diseases. The output of this expert system
is the belief of illness.
Diseases symptoms that included in this
research are divided into two modeling, fuzzy
modeling and crisp modeling. Fuzzy modeling
has 5 input variables (body temperature, pulse
rate, systolic blood pressure, body weight, and
blood sugar), meanwhile crisp modeling consists
of 47 symptoms. Each crisp symptom are
modeled into two sets of value (Yes or No).
Patient are given multiple choice to define a
crisp symptom, that is No, A bit of,
Enough, Very, and Very High with its own
value
2.1. Fuzzy expert system
Fuzzy logic is determined as a set of
mathematical
principles
for
knowledge
representation based on degrees of membership
rather than on crisp membership of classical
binary logic[8]. In other words, a fuzzy expert
system is an expert system that uses fuzzy logic
instead of Boolean logic[9]. The differences
between these two logic are depends on the
value, while Boolean logic only recognized
True/False value, the fuzzy logic have a truth
value that range between 0 to 1.
The process of the system begins with
knowledge acquisition of symptoms for each
disease. The next process is knowledge
presentation of the facts that have been obtained

from the previous step and determine whether


the symptoms are suitable for crisp or fuzzy set.
Crisp symptoms are modeled in two sets, while
fuzzy symptoms are processed further to find the
degree of membership.
The next process is fuzzification which is
the process of changing a real crisp value (true or
false) into a fuzzy value. The first step of
fuzzification is to construct rules by using the
input parameters of fuzzy expert system.
Certainty factor then used to draw conclusion of
rules that applied in certain events based on facts
or symptoms. The aim of certainty factor is to
give a value of trust which is useful for
determining the confidence level on the
relationship between symptoms that exist in
fuzzy rule.
After fuzzification has been conducted, the
next step is the implication and composition
process that used in consultation environment
between user and expert system. The final
process is defuzzification that translates the
output from inference engine into crisp output.
The crisp output then offered to users as the final
conclusion of facts or symptoms that given.In
addition, knowledge improvement is a process to
update data in knowledge base.
2.2. Input variables classification
The first step of fuzzy expert system
processing is determining the input variable.
Input variable that used are body temperature,
pulse rate, systolic blood pressure, body weight
and blood sugar.
a.

Body temperature.
This input variable has divided into 5 fuzzy
sets: Very Low, Low, Normal, High and
Very High. Membership function of Low,
Normal and High sets are triangular, while
membership function of Very Low and Very
High sets are trapezoid. These fuzzy sets will be
shown in Table 1. Membership functions of body
temperature field will be shown in Fig. 1.
Table 1. Classification of Body Temperature

Input Variable

Range

Body
Temperature

<360 C
350C 370C
360C 380C
37.50C

39.50C
>38.50C

Fuzzy
Sets
Very
Low
Low
Normal
High
Very

High

Pulse Rate

0 50
30 70
50 100
90 140
>120

Very Low
Low
Normal
High
Very High

Fig.1. Membership functions of body temperature

Membership functions of body temperature:

36-x
VeryLow ( x ) = 1.0 , 35x36
1, x35

Low ( x )

Fig. 2. Membership functions of pulse rate

Membership functions of pulse rate:

50-x
VeryLow ( x ) = 20 , 30x50
1, x30

x-35
, 35x36
1.0
= 1, x=36
37-x
, 36x37
1.0

Low ( x )

{
{

x-36
, 36x37
1.0
Normal ( x ) = 1, x=37
38-x
, 37x38
1.0

High ( x )

b.

Table 2. Classification of pulse rate

Input Variable

Interva
l

Fuzzy
Set

{
{

x-50
, 50x75
25
Normal ( x ) = 1, x=75
100-x
, 75x100
25

x-37.5
, 37.5x38.5
1.0
High ( x ) = 1, x=38.5
39.5-x
, 38.5x39.5
1.0
Pulse rate.
Pulse rate variable has 5 fuzzy sets: Very
Low, Low, Normal, High and Very
High. Membership function of Low,
Normal and High sets are triangular, while
membership function of Very Low and Very
High sets are trapezoid. These fuzzy sets will be
shown in Table 2. Membership functions of pulse
rate field will be shown in Fig.2.

x-30
, 30x50
20
= 1, x=50
70-x
, 50x70
20

x-90
, 90x115
25
= 1, x=115
115-x
, 115x140
25

x-120
, 120x140
VeryHigh ( x ) = 20
1, x140
c.

Systolic blood pressure.


This input variable has divided to 5 fuzzy
sets: Very Low, Low, Normal, High and
Very High. Membership function of Low,
Normal and High sets are triangular, while
membership function of Very Low and Very
High sets are trapezoid. These fuzzy sets will be

shown in Table 3. Membership functions of


systolic blood pressure field will be shown in
Fig.3.

x-140
, 140x150
VeryHigh ( x ) = 10
1, x150

Table 3. Classification of systolic blood pressure

Input Variable
Systolic
Pressure

Interval
Blood

<50
40 100
90 140
120

160
>150

Fuzzy
Set
Very
Low
Low
Normal
High
Very
High

d.

Body weight.
Body weight variable is divided into two
categories based on the gender, adult female and
adult male. Each category has 5 fuzzy sets
(Very Low, Low, Normal, High and
Very High). Membership function of Low,
Normal and High sets are triangular, while
membership function of Very Low and Very
High sets are trapezoid. These fuzzy sets will be
shown in Table 4. Membership functions of
female body weight field will be shown in Fig. 4.
Table 4. Classification of adult female body weight

Input Variable
Adult Female
Body Weight

Interval
<40
35 47
45 162
60 67
>65

Fig.3. Membership functions of systolic blood pressure

Membership
pressure:

functions

of

systolic

Fuzzy Set
Very Low
Low
Normal
High
Very High

blood

1, x40
VeryLow ( x ) = 50-x
, 40x50
10

Low ( x )

x-40
, 40x70
30
= 1, x=70
100-x
, 70x100
30

{
{

x-90
, 70x115
25
Normal ( x ) = 1, x=115
115-x
, 115x140
25

High ( x )

x-120
, 120x140
20
= 1, x=140
160-x
, 140x160
20

Fig.4. Membership functions of adult female body weight

Membership functions of adult female body


weight:

1, x40
VeryLow ( x ) = 35-x
, 35x50
5

Low ( x )

{
{

x-35
, 35x40
7
= 1, x=40
47-x
, 40x47
7

x-45
, 45x47
15
Normal ( x ) = 1, x=47
62-x
, 47x62
15

High ( x )

x-65
, 165x67
VeryHigh ( x ) = 2
1, x67

High ( x )

Fuzzy sets for male body weight input field


will be shown in Table 5. Membership functions
of male body weight field will be shown in
Fig.5.
Interval

Fuzzy Set

<40
35 47
45 162
60 67
>65

Very Low
Low
Normal
High
Very High

x-60
, 60x63
22
= 1, x=63
85-x
, 63x85
22

x-80
, 80x85
VeryHigh ( x ) = 5
1, x85

Table 5. Classification of adult male body weight

Input
Variable
Adult Male
Body Weight

{
{

x-53
, 53x60
3
Normal ( x ) = 1, x=60
63-x
, 60x63
3

x-60
, 60x62
5
= 1, x=62
67-x
, 62x67
5

e.

Blood sugar.
Blood sugar variable divided into 5 different
fuzzy sets: Very Low, Low, Normal,
High and Very High. The membership
function of Very Low and Very High sets are
trapezoidal while Low, Normal and High
sets are triangular. Table 6 below depict the
fuzzy set classification for this variable. Figure 6
is the graphical representation of the membership
function curve.
Table 6. Classification of blood sugar

Fig.5. Membership functions of adult male body weight


variable

Membership functions of adult male body


weight:

Input Variable

Interval

Fuzzy Set

Blood Sugar

< 70

Very Low

60 130

Low

120 180

Normal

170 240

High

> 230

Very High

1, x42
VeryLow ( x ) = 45-x
, 42x45
3

Low ( x )

x-42
, 42x45
15
= 1, x=45
60-x
, 45x60
15

Fig6. Membership functions of blood sugar

Membership functions of blood sugar:

1, x60
VeryLow ( x ) = 70-x
, 60x70
10

Low ( x )

{
{
{

x-60
, 60x70
60
= 1, x=70
130-x
, 70x130
60

x-120
, 120x130
50
Normal ( x ) = 1, x=130
180-x
, 130x180
50

High ( x )

x-170
, 170x180
60
= 1, x=180
240-x
, 180x240
60

x-230
, 230x240
VeryHigh ( x ) = 10
1, x240
3.

order of questions as shown in the pictures Fig.


7.

Fig. 7. Gender question

Fig. 7. is the consultation form related to the


gender of the patient. Based on the answers
given patient, for example is a male, then the
system will search for the question of the
symptoms that affected male gender.

Fig. 8. Weight symptoms

Fig. 8. is the consultation form for the male


body weight symptoms input field. The system
will calculate the degree of membership of the
input response of the patient.
Weight = High(70) = 0.80
After patient answered questions, the system
will proceed to the next question shown in Fig.9.

Experiment

System testing is done to ensure that the


generated diagnosis has the same similarity with
the medical expert analysis. This experiment was
conducted using web interface that programmed
with PHP and HTML programming.
To obtain satisfactory results of the study, the
addition of the knowledge base were by the
system administrator. Consultations were carried
out among patients with expert system by
answering some questions about symptoms of
diseases.
The system consists of several processes
such as disease process data input, input process
symptoms, the input process relationship of
symptoms and disease, input process fuzzy
answer, input process rules, and minimum
percentage configurations.
Diagnosis results will be described using
calculation of the consultation process with the

Fig. 9. Symptoms of shortness of breath

Tin Fig. 9. it is shown that the patient


chooses the answer with the value of 8.38. The
system will calculate the degree of membership.
Breathless = VeryHigh(8.38) = 0.38
ShortnessOfBreath= High(8.38) = 0.41
After filling in the question, the system will
proceed to the next question as shown in Fig. 10.

Fig. 10. Symptoms of active smokers

Fig. 10. is the consultation form related to


symptoms of active smokers. The patient
chooses the answer with the value of 7.42. The
system will calculate the degree of membership.

The result of this calculation can be seen in


Table 7.
Table 7. Difference in the doctor's diagnosis and system
No.
Expert
Fuzzy Expert
Gap of
(%)
System (%)
Diagnosis
(%)
1
45
48
6.67
2
64
60
6.25
3
56
58
3.57
4
43
45
4.65
5
55
50
9.09
6
72
76
5.56
7
76
70
7.89
8
42
44
4.76
9
54
57
5.56
10
0
0
0
Average of Gap of Analysis between
5.39
Expert and Fuzzy Expert System (%)

Smokers = High(7.42) = 0.94


After filling all the questions available, the
system will perform the inference process to
generate the result of consultation using
percentage of belief in each disease.
The next process is the implication process
by finding the rules base on reasoning approach
that store in system database. Rules query is
done by using production system (IFTHEN).
Result that obtained from overlapping rules then
compared with each other, the system will select
the minimum value. Fig. 11. is the final result of
fuzzy expert system.

The difference between the results of the


diagnosis made by the doctor and the system
against 10 cases were tested at 5.39%. This
suggests that the expert system has developed a
level of similarity with the real experts at
94.61%.

Fig. 11. Final result of system

4.

System uses verification method to test the


final result as shown in Fig. 11. The test will
look for the similarities of diagnosis between
medical expert and developed expert system.
Testing is done directly by the expert
specializing in internal medicine.
Test carried out on 10 different cases, based
on the test results of each case, the average
calculation diagnosis made by physicians and
system for each test case with the following
formula:
N

Conclusion

The purpose of this research is to build a


web-based expert system for the diagnosis of
diseases that related to human's heart and lung
organ. This system developed by using the
combination of certainty factor and fuzzy logic
method. The developed system is expected to
facilitate the patient or medical doctor in health
consultation regarding symptoms that may lead
to both diseases. The system provides output of
diagnosis expressed in percentage of belief. Test
result revealed that system result has similarity at
94.61% compared to medical expert diagnosis.

doctor diagnosis i
Average results of the doctor's diagnosis =
N

i=1

diagnosis
Average results of diagnosis system =

i=1

Differential diagnosis made by the expert


and system for each test case is calculated with
the following formula:

References
[1] Adeli, Ali & Mehdi, Neshat.A Fuzzy
Expert System for Heart Disease
system iDiagnosis.IAENG Proceeding of the
International
Multi
Conference
of
Engineers and Computer Science Vol. 1.
March 2010.

[2] Mehdi, Neshat & Mehdi, Yaghobi.


Designing a Fuzzy Expert System of
Diagnosing the Hepatitis B Intensity Rate

diagnosis systemi doctor diagnosis i


x and
100 Comparing it with Adaptive Neural
doctor diagnosis i Network Fuzzy System. Proceeding of the
World Congress on Engineering and
Difference=

Computer Science (WCECS) Vol. II.


October 2009.
[3] Zarandi, Fazel M.H. & Zolnoori, M. &
Moin, M. & Heidarnejad, H. A Fuzzy
Rule-Based Expert System for Diagnosing
Asthma. \Transaction E. Industrial
Engineering Vol. 17 No. 2, pp 129-142.
December 2010.
[4] Putra, Darma & Prihatini, Manik. Fuzzy
Expert System for Infectious Diseases by
Certainty Factor. Telkomnika Vol. 9, No.
1, pp. 1-8. April 2011

[7] Amanda, Prista& Mustafidah, Hindayanti


Expert System for Diagnosing Liver
Disease Using Forward Chaining. JUITA
ISSN: 2086-9398 Vol.1 No.4, November
2011.
[8] X.Y. Djam, G.M Wajiga, Y.H. Kimbi &
N.V. Blamah. A Fuzzy Expert System for
the Management of Malaria. International
Journal of Pure and Applied Sciences and
Technology ISSN: 2229-6107 Vol.5 No.2,
November 2011.

[5] Ragab, Abdul Hamid M. & Fakeeh, Khalid


Abdullah & Roushdy, Mohamed Ismail. A
Medical Multimedia Expert Systems for
Heart
Diseases
Diagnosis
&
Training.Proceeding 2nd Saudi Sci. Conf.
Fac. Sci. KAU part IV, pp 31-45. 2005.

[9] Abdullah Al-M Al-Ghamdi, Majda A.


Wazzan, Fatimah M. Mujallid, & Najwa
K.Bakhsh. An Expert System of
Determining Diabetes Treatment Based on
Cloud Computing Platforms. International
Journal of Computer Science and
Information Technologies ISSN: 0975-9646
Vol.2 No.5, November 2011.

[6] Salem, Abdel-Badeeh M. & Bagoury,


Bassant M. El. A Case-Based Adaption
Model for Thyroid Cancer Diagnosis Using
Neural Networks. FLAIRS, pp 155-159.
2003.

[10] McCance KL. Structure &Function of


The
Cardiovascular
&
Lymphatic
Systems. USA: 2006.

Potrebbero piacerti anche