Ontology-based multi-agents for intelligent healthcare applications
-
Upload
independent -
Category
Documents
-
view
5 -
download
0
Transcript of Ontology-based multi-agents for intelligent healthcare applications
ORIGINAL RESEARCH
Ontology-based multi-agents for intelligent healthcareapplications
Mei-Hui Wang • Chang-Shing Lee •
Kuang-Liang Hsieh • Chin-Yuan Hsu •
Giovanni Acampora • Chong-Ching Chang
Received: 14 July 2009 / Accepted: 20 February 2010 / Published online: 12 March 2010
� Springer-Verlag 2010
Abstract A healthy diet and lifestyle are the most
effective approaches to prevent disease. Good eating habits
are central to a healthy lifestyle. When a person eats too
much or too little on a continual basis, the risk of disease
will increase. Therefore, developing healthy and balanced
eating habits is essential to disease prevention. This paper
proposes an ontology-based multi-agents (OMAS), includ-
ing a personal knowledge agent, a fuzzy inference agent,
and a semantic generation agent, for evaluating the health
of diets. Using the proposed approach, domain experts can
create nutritional facts for common Taiwanese foods. Next,
the users are requested to input foods eaten. Finally, the
food ontology and personal profile ontology are con-
structed by domain experts. Fuzzy markup language (FML)
is used to describe the knowledge base and rule base of the
OMAS. Additionally, web ontology language (OWL) is
employed to describe the food ontology and personal
profile ontology. Finally, the OMAS semantically analyzes
dietary status for users based on the pre-constructed
ontology and fuzzy inference results. Using the generated
semantic analysis, people can obtain health information
about what they eat, which can lead to a healthy lifestyle
and healthy diet. Experimental results show that the pro-
posed approach works effectively and diet health status can
be provided as a reference to promote healthy living.
Keywords Ontology � Fuzzy inference � Agent �Fuzzy markup language (FML) � Diet planning
1 Introduction
Learning to know how to eat healthily is not easy for most
individuals. Therefore, an intelligent agent for planning
healthy diets is becoming an increasingly important
research topic. An intelligent agent that automatically
provides tips for how to choose foods that improve health
and avoid foods that increase risk of illness would be of
great assistance for most people, especially those with
diabetes or cardiovascular diseases. Wang et al. (2009)
proposed an intelligent healthy diet planning multi-agent
(IHDPMA) for healthy diet planning. Chen and Chen
(2008) noted that agent technology is a key area in the field
of artificial intelligence research and agents are being used
in an increasingly wide area of applications. For example,
Sanchez et al. (2009) presented the Semantic Web services
and Multi-Agent Systems framework (SEMMAS) for
seamless integration of technologies by using ontologies
that facilitate the interoperation of agents and Web ser-
vices. Zunino and Campo (2009) proposed a multi-agent
system called Chronos that assists users in organizing
meetings.
Each person has a unique diet. Therefore, to determine
individual dietary status, an ontology is a good idea for
building personal dietary patterns and providing nutritional
M.-H. Wang � C.-S. Lee (&)
Department of Computer Science and Information Engineering,
National University of Tainan, Tainan, Taiwan
e-mail: [email protected]
K.-L. Hsieh � C.-C. Chang
Graduate Institute of System Engineering,
National University of Tainan, Tainan, Taiwan
C.-Y. Hsu
Advance e-Commerce Institute,
Institute for Information Industry, Kaohsiung, Taiwan
G. Acampora
Department of Mathematics and Computer Science,
University of Salerno, Salerno, Italy
123
J Ambient Intell Human Comput (2010) 1:111–131
DOI 10.1007/s12652-010-0011-5
facts for a healthy diet is needed. An ontology is a very
powerful tool for representing information and its seman-
tics; ontologies can be thought of as knowledge represen-
tations as ontologies do more than just control vocabulary
(Reformat and Ly 2009). Consequently, ontologies are
applied to many such research fields as news summariza-
tion (Lee et al. 2005) and medical information systems
(Orgun and Vu 2006). Furthermore, Reformat and Ly
(2009) proposed an ontology-based approach that provides
a rich environment for expressing different information
types, including perceptions. Multi-agent systems com-
bined with ontologies have been utilized to support dis-
tributed decision-making in such fields as manufacturing,
business, and engineering (Chen and Chen 2008). Lee et al.
(2006) presented a meeting scheduling system by combing
a genetic fuzzy agent with an ontology model. Debenham
and Sierra (2008) structured dialogues and process infor-
mation collected by agents using an agent communication
language.
Applying agent technology to healthcare is also an
important research topic because each description must
have a unique and clear healthcare meaning (Caceres et al.
2006). According to Moreno (2006), agent technology is
suitable for addressing healthcare problems for seven main
reasons. (1) An agent physically distributes required
knowledge to several locations. (2) An agent can model
autonomous entities. (3) Agent-based systems can employ
security mechanisms. (4) Agent technology has the ability
to communicate and coordinate. (5) Agents can automati-
cally discover and compose e-services. (6) Intelligent
agents have deliberate, reactive, and flexible behaviors and
can learn. (7) An agent’s autonomous, reactive, and flexible
characteristics make agents ideal for implementing ambient
intelligence applications. Many studies have applied agents
in healthcare, for example, respiratory waveform recogni-
tion (Lee and Wang 2007) and electrocardiogram appli-
cations (Lee and Wang 2008). Furthermore, the Multi-
agent Systems Group (GruSMA) team (Moreno et al. 2006)
designed and implemented a Healthcare Services multi-
agent system to help doctors reduce error at each diagnostic
and treatment stage. Caceres et al. (2006) developed a
semantic service-discovery mechanism that improves the
usability of a service-discovery system in medical emer-
gencies. Chan et al. (2008) created a multi-agent archi-
tecture for mobile health monitoring to check patient date,
reason collectively, and then recommend actions to
patients and medical staff in a mobile environment.
This paper combines ontology and agent technologies in
developing an intelligent multi-agent for diet evaluation. In
the proposed approach, domain experts first use Protege
software (Noy and McGuinness 2001) to pre-define a food
ontology according to nutritional facts obtained from the
Internet and convenient stores in Taiwan. Additionally,
ontology domain experts pre-built the personal profile
ontology for users. The proposed ontology-based multi-
agents (OMAS), including a personal knowledge agent, a
fuzzy inference agent, and a semantic generation agent,
provides users with a semantic health-based description of
the foods they eat. A fuzzy markup language (FML) is
utilized to model the knowledge base and rule base of the
OMAS (Acampora and Loia 2005a, b). Finally, semantic
results for healthy diet status are stored in the healthy diet
status repository to provide users with a reference for
future dietary choices. The remainder of this paper is
organized as follows: Section 2 describes the ontology
model for semantic healthcare applications. Section 3
presents the applications of fuzzy markup language (FML)
for healthcare. Section 4 introduces the ontology-based
multi-agents for healthy diet evaluation. Section 5 gives
some experimental results. Section 6 provides conclusions.
2 Ontology model for semantic healthcare applications
This section describes the ontology model for semantic
healthcare applications. Section 2.1 briefly introduces the
structure of the semantic healthcare application. Sec-
tions 2.2 and 2.3 describe the domain ontology model and
personal profile ontology, respectively.
2.1 Structure of the semantic healthcare application
Figure 1 shows the structure of the semantic healthcare
applications. A three-layer structure with a knowledge
layer, communication layer, and application layer, is
employed for the semantic healthcare applications.
The knowledge layer has a knowledge base, a rule base,
a personal profile ontology, a food ontology, and a healthy
diet status repository. The communication layer provides
application interfaces, such as an FML and web ontology
language (OWL), for interacting with the application layer
and knowledge layer. The FML describes the knowledge
base using fuzzy concepts and fuzzy rules of the OMAS;
the OWL describes the food ontology and personal profile
ontology. First, a user with a personal digital assistant
(PDA), personal computer, or notebook computer accesses
the OMAS platform via the Internet. After authentication, a
user can access the OMAS platform. Next, a user inputs the
foods eaten. Finally, based on knowledge stored in the
knowledge layer, a user can receive an analysis of dietary
status via the communication layer.
2.2 Domain ontology model
Based on the levels of organization (Ferber 1999) and
previous work (Lee et al. 2005), this paper presents a
112 M.-H. Wang et al.
123
domain ontology model for healthcare applications. Fig-
ure 2 shows the structure of the domain ontology model,
which has a domain name, category set, and concept set.
The domain name represents the name of the ontology
model. The category set contains several categories,
labeled ‘‘category 1, category 2, category 3, …, and cate-
gory k.’’ Each concept in the concept set contains a concept
name Cm and an attribute set ACm1; � � � ;ACmqm
� �for an
application domain. In addition, a relationship exists
among concepts that belong to the same category. For
Food OntologyPersonal Profile
Ontology
Internet
Personal MealInput
OMAS Platform
Application Layer
Communication Layer
Knowledge Layer
KnowledgeBase
Rule Base
Healthy Diet State Repository
Note:
(1) OMAS: Ontology-based Multi-AgentS (2) FML: Fuzzy Markup Language (3) OWL: Web Ontology Language
OntologyDomain Experts
OMAS
FML OWL
HealthcareDomain Experts
Fig. 1 Structure of semantic healthcare applications
Concept Set
Category Set
C1
C3
Cm
Domain Name
… …
…
…
……
…
Category 1
Category k
Category 3
Category 2
Acm2Acm1
Acmqm
Acm3
Ac12
Ac1q1
Ac11
C 2
…
Ac22Ac23
Ac2q2
Ac21
Ac31
Ac32Ac33
Ac3q3
C4
…
Ac42Ac 43
Ac4q4
Ac41
C5
…
Ac52Ac53
Ac5q5
Ac 51
Ac13
Fig. 2 Structure of the domain ontology
Ontology-based multi-agents for intelligent healthcare applications 113
123
example, there is a bi-directional arrow between concepts
C1 and C2 because these two concepts belong to the
category 2. We assume a meal comprises a main course,
side dish, dessert, and beverage. Moreover, each compo-
nent of each meal has its own nutritional facts, which can
contain product-specific information such as serving size,
calories, and nutritional information based on the nutri-
tional facts on food labels (US Food and Drug Admin-
istration 2009).
Figure 3 shows the constructed food ontology. The
domain name of the food ontology is Meal. Categories in
the category set are Main Courses, Side Dishes, Desserts,
and Beverages. The concept set contains many concepts. In
this paper, calories per portion as well as grams of carbo-
hydrates, protein, and fat per portion are considered in the
constructed food ontology. Therefore, each concept has
four attributes—Calories, Carbohydrates, Protein, and
Fat. Additionally, each attribute has an attribute value. The
food ontology indicates that (1) Main Courses, Sides
Dishes, Desserts, and Beverages, are part of a meal.
(2) Concepts Citizen Lunch Box and Hawaiian Pizza are
under the Main Courses category. (3) Concepts Coca-Cola
and Apple Juice belong to the Beverages category. (4)
Concepts Egg Pudding and Coffee Egg Roll are Desserts
category. (5) Concepts Garlic Cheese Bread and Grapes
Toast are under Side Dishes category. (4) The Carbohydrate,
Protein, Fat, and Calories are 93, 26, 29 g, and 737 kcal,
respectively, for the concept Citizen Lunch Box. (5) The
values of attributes Carbohydrate, Protein, Fat, and Cal-
ories are 74, 13, 11 g, and 445 kcal, respectively, for the
concept Grapes Toast. (6) The attribute values of Carbo-
hydrate, Protein, Fat, and Calories are 17, 6, 16 g, and
236 kcal, respectively, for Egg Pudding. (7) Concepts,
belonging to the same category, exist a relationship, for
example, both concepts Coca Cola and Apple Juice are the
Beverages category; therefore, a bi-directional arrow is
shown between these two concepts.
2.3 Personal profile ontology
Individuals vary in profiles and eating habits. A personal
profile can be based on factors such as an individual’s
gender, age, height, and weight. Thus, personal daily
planned calories must be based on body mass index (BMI).
Notably, as a meal can comprise a main course, side dishes,
desserts, and beverages, people typically only know what
they eat, not whether they eat healthily. Additionally,
according to nutritional information, each dish has grams
of carbohydrates, protein, and fat per portion, such that
Actual Calories a dish contains per portion can be known.
With the assistance of nutritional information, the Per-
centage of Calories from Carbohydrate (PCC), Percentage
Meal
Citizen LunchBox
Hawaii Pizza
Carbo-hydrate
93 g
Fat29 g
Calories737 kcal
Protein10 g Fat
12 g
Calories336 kcal
Carbo-hydrate
47 g
Garlic CheeseBread
Grapes Toast
MainCourses Dess-
erts
Bever-ages
Carbo-hydrate
17 g
Protein0 g
Protein6 g
Carbo-hydrate
66 g
Fat16 g
Fat0 gCalories
236 kcal
Calories252 kcal
Egg Pudding
CoffeeEgg Roll
Coca Cola
Apple Juice
Protein26 g
Category SetSide
Dishes
Concept Set
Fat13 g
Calories265 kcal
Carbo-hydrate
31 gProtein17g
Fat11 g
Calories445 kcal
Carbo-hydrate
74 gProtein13 g
Carbo-hydrate
17 gProtein
2 gFat10 g
Calories166 kcal
Carbo-hydrate
12 gProtein
0 gFat0 g
Calories46 kcal
...
...
...
...
...
...
...
...
...
...
...
Fig. 3 Structure of the food ontology
114 M.-H. Wang et al.
123
of Calories from Protein (PCP), Percentage of Calories
from Fat (PCF), and Caloric Difference (CD) between
actual calories people consume and planned caloric intake
set by nutritionists, are acquired. Based on the above
mentioned information, the personal profile ontology is
constructed. Figure 4 shows an example of the user’s
personal profile ontology. This person’s sex is male, Age is
30, Height is 170 cm, Weight is 60 kg, BMI is 20.7 kg/m2,
PCP is 8%, PCC is 57%, PCF is 36%, and CD is 156 kcal.
3 Fuzzy Markup Language for healthcare applications
Fuzzy Markup Language (FML) is a fuzzy-based markup
language that can manage fuzzy concepts, fuzzy rules, and
a fuzzy inference engine (Acampora and Loia 2005a, b).
Additionally, FML is composed of three layers—eXtensi-
ble Markup Language (XML), a document-type definition,
and extensible stylesheet language transformations. Sec-
tion 3.1 gives an FML overview. Section 3.2 introduces an
FML implementation, and Section 3.3 introduces the FML-
Based intelligent healthcare application. Some examples of
the OMAS are shown in Section 3.4.
3.1 Fuzzy Markup Language overview
Differently from other similar approaches such as Fuzzy
Control Language (FCL) or MATLAB Fuzzy Inference
System (FIS) developed by the Matworks, FML exhibits
additional benefits in the FLC programming that are related
to its XML derivation. Indeed, whereas FCL or FIS code is
totally based on a textual representation, FML programs
are coded through a collection of correlated semantic tags
capable of modeling different controller components by
exploiting abstraction benefits offered by XML tools. From
the implementation point of view, these benefits allow
fuzzy designers (1) to simply code their ideas on hetero-
geneous hardware without having knowledge about pro-
gramming details related to the different platforms and (2)
to program a fuzzy controller without referring to general
purpose computer languages. In our scenario, FML allows
us to program diet agents in a very short time and simul-
taneously to test the inferred results on different hardware
without additional programming works.
In this sub-section, FML is explained starting from a
very high level introduction to fuzzy systems, the most
wide-spread application of fuzzy logic. Indeed, fuzzy logic
controllers (FLCs) have been applied in consumer goods
such as video cameras and washing machines, or industrial
processes such as cement kilns and trains. Since Zadeh’s
coining of the term fuzzy logic and Mamdani’s early
demonstration of FLC, enormous progress has been made
by the scientific community in the theoretical, as well as
application fields of FLC. Trivially, a fuzzy control allows
the designer to specify the control in terms of sentences
rather than equation by replacing a conventional controller,
Subject 1
Meal No. 1
PersonalMeal
PersonalInformation
Age
Category Set
Concept Set
Value30
...
...
Height
Value170cm
Weight
Value60kg
BMI
Value20.7kg/m^2
Planned Calories_1
Value584kcal
Sex
ValueMale
Value156kcal
CD_1
Carbo-hydrate
105 g
Fat30 g
Calories740 kcalProtein
14 g
Value8%
Value57%
Value36%
PCP_1 PCC_1 PCF_1
Meal No. n
Carbo-hydrate
119 g
Fat29 g
Calories857 kcalProtein
30 g
BMI: Body Mass IndexPCC: Percentage of Calories from CarbohydratePCP: Percentage of Calories from ProteinPCF: Percentage of Calories from FatCD: Caloric Difference
...... ...
... ...
...
......
... ...
...............
Fig. 4 Structure of the personal profile ontology
Ontology-based multi-agents for intelligent healthcare applications 115
123
a proportional-integral-derivative (PID) controller, with
linguistic IF–THEN rules. The use of linguistic variables
represents a significant paradigm shift in system analysis:
using the linguistic approach, the focus of the attention in
the dependencies representations is shifted from differen-
tial equations to fuzzy IF–THEN rules in the form if X is A
then Y is B. The propositions X is A and Y is B are called
fuzzy clauses; A and B are linguistic variables and X and Y
are their linguistic values (for instance, if Pressure is high
then Volume is low). The main components of fuzzy con-
troller are (organized in a hierarchical way): (1) fuzzy
knowledge base; (2) fuzzy rule base; (3) inference engine;
(4) fuzzification subsystem; and (5) defuzzification
subsystem.
3.2 Fuzzy Markup Language Implementation
An FML implementation is based on the employment of
tags able to model different parts of fuzzy controller in a
taxonomic way. The root of fuzzy controller taxonomy, the
Controller node, is represented through the FML tag
\FUZZYCONTROL[. Such tag represents the root tag of
FML programs, that is, the opening tag of each FML
program. \FUZZYCONTROL[ uses three tags: type,
defuzzyfyMethod, and ip. The type attribute permits to
specify the kind of fuzzy controller, Mamdani or Takagi–
Sugeno–Kang (TSK); defuzzyfyMethod attribute defines the
defuzzification method used in modeled controller; ip is
used to define the location of controller in the computer
network. The fuzzy knowledge base is defined by means of
the tag \KNOWLEDGEBASE[ which maintains the set
of fuzzy concepts used to model the fuzzy rule base. The
\KNOWLEDGEBASE[ uses the attribute ip that deter-
mines the location in the network of whole fuzzy knowl-
edge base of our system. In order to define the fuzzy
concept related controlled system, \KNOWLEDGE-
BASE[ tag uses a set of nested tags: (1) \FUZZYVARI-
ABLE[; (2)\FUZZYTERM[; (3) a set of tags defining a
shape of fuzzy sets.
\FUZZYVARIABLE[ defines the fuzzy concept, for
example, ‘‘temperature’’; \FUZZYTERM[ defines a lin-
guistic term describing the fuzzy concept, for example,
‘‘low temperature’’; the set of tags defining the shapes of
fuzzy sets are related to fuzzy terms. The attributes of
\FUZZYVARIABLE[ tags are: name, scale, domainLeft,
domainRight, type, and ip. (1) The name attribute defines
the name of fuzzy concept, for instance, temperature; (2)
scale is used to define the scale used to measure the fuzzy
Fig. 5 Knowledge base and rule base of the intelligent healthcare applications
116 M.-H. Wang et al.
123
concept, for instance, Celsius degree; (3) domainLeft and
domainRight are used to model the universe of discourse of
fuzzy concept, that is, the set of real values related to fuzzy
concept; (4) the position of fuzzy concept into rule (con-
sequent part or antecedent part) is defined by type attribute;
(5) ip defines the position of fuzzy knowledge base in the
Table 1 Part of the FML view of the OMAS
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <FuzzyController ip="140.133.33.2" name="Healthy Diet"> <KnowledgeBase> <FuzzyVariable domainleft="0.0" domainright="100.0" name="PCC" scale="%" type="input"> <FuzzyTerm complement="false" name="Low"> <TrapezoidShape Param1="0.0" Param2="0.0" Param3="50.0" Param4="55.0"/> </FuzzyTerm> <FuzzyTerm complement="false" name="Balanced"> <TrapezoidShape Param1="50.0" Param2="55.0" Param3="65.0" Param4="70.0"/> </FuzzyTerm> <FuzzyTerm complement="false" name="High"> <TrapezoidShape Param1="65.0" Param2="70.0" Param3="100.0" Param4="100.0"/> </FuzzyTerm> </FuzzyVariable> <FuzzyVariable domainleft="0.0" domainright="250.0" name="CD" scale="%" type="input"> <FuzzyTerm complement="false" name="Acceptable"> <TrapezoidShape Param1="0.0" Param2="0.0" Param3="50.0" Param4="100.0"/> </FuzzyTerm> <FuzzyTerm complement="false" name="MoreOrLessAcceptable"> <TrapezoidShape Param1="70.0" Param2="100.0" Param3="150.0" Param4="200.0"/> </FuzzyTerm> <FuzzyTerm complement="false" name="UnAcceptable"> <TrapezoidShape Param1="150.0" Param2="200.0" Param3="250.0" Param4="250.0"/> </FuzzyTerm> </FuzzyVariable> ... <FuzzyVariable accumulation="MAX" defaultValue ="0.0" defuzzifier="COG" domainleft="0.0" domainright="1.0" name="HDS" scale="" type="output"> <FuzzyTerm complement="false" name="VeryUnHealty"> <TrapezoidShape Param1="0.0" Param2="0.0" Param3="0.1" Param4="0.25"/> </FuzzyTerm> <FuzzyTerm complement="false" name="UnHealthy"> <TrapezoidShape Param1="0.1" Param2="0.25" Param3="0.25" Param4="0.5"/> </FuzzyTerm> <FuzzyTerm complement="false" name="MediumHealthy"> <TrapezoidShape Param1="0.25" Param2="0.5" Param3="0.5" Param4="0.75"/> </FuzzyTerm> <FuzzyTerm complement="false" name="Healthy"> <TrapezoidShape Param1="0.5" Param2="0.75" Param3="0.75" Param4="0.9"/> </FuzzyTerm> <FuzzyTerm complement="false" name="VeryHealthy"> <TrapezoidShape Param1="0.75" Param2="0.9" Param3="1.0" Param4="1.0"/> </FuzzyTerm> </FuzzyVariable> </KnowledgeBase> <RuleBase activationMethod="MIN" andMethod="MIN" name="RuleBase1" orMethod="MAX" type="mamdani"> <Rule connector="and" name="RULE1" operator="MIN" weight="1.0"> <Antecedent> <Clause> <Variable>PCC</Variable> <Term>Low</Term> </Clause> <Clause> <Clause> <Variable> CD</Variable> <Term>Acceptable</Term> </Clause> </Antecedent> … <Consequent> <Clause> <Variable> HDS</Variable> <Term>UnHealthy</Term> </Clause> </Consequent> … </RuleBase> </FuzzyController>
Ontology-based multi-agents for intelligent healthcare applications 117
123
Table 2 Part of the constructed fuzzy rules of the OMAS
Rule no. Input fuzzy variables Output fuzzy variable
Age BMI PCC PCP PCF CD HDS
R1 Young UnderWeight Low Low Low Acceptable UnHealthy
R2 Young UnderWeight Low Low Low M.L.UnAcceptable UnHealthy
R3 Young UnderWeight Low Low Low UnAcceptable VeryUnHealthy
R4 Young UnderWeight Low Low Balanced Acceptable UnHealthy
R5 Young UnderWeight Low Low Balanced M.L.UnAcceptable UnHealthy
R6 Young UnderWeight Low Low Balanced UnAcceptable VeryUnHealthy
R7 Young UnderWeight Low Low High Acceptable UnHealthy
R8 Young UnderWeight Low Low High M.L.UnAcceptable UnHealthy
R9 Young UnderWeight Low Low High UnAcceptable VeryUnHealthy
R10 Young UnderWeight Low Balanced Low Acceptable UnHealthy
R11 Young UnderWeight Low Balanced Low M.L.UnAcceptable UnHealthy
R12 Young UnderWeight Low Balanced Low UnAcceptable VeryUnHealthy
R13 Young UnderWeight Low Balanced Balanced Acceptable Healthy
R14 Young UnderWeight Low Balanced Balanced M.L.UnAcceptable MediumHealthy
R15 Young UnderWeight Low Balanced Balanced UnAcceptable VeryUnHealthy
R16 Young UnderWeight Low Balanced High Acceptable UnHealthy
R17 Young UnderWeight Low Balanced High M.L.UnAcceptable UnHealthy
R18 Young UnderWeight Low Balanced High UnAcceptable VeryUnHealthy
R19 Young UnderWeight Low High Low Acceptable UnHealthy
R20 Young UnderWeight Low High Low M.L.UnAcceptable UnHealthy
… … … … … …R701 Old OverWeight Balanced High High M.L.UnAcceptable UnHealthy
R702 Old OverWeight Balanced High High UnAcceptable VeryUnHealthy
R703 Old OverWeight High Low Low Acceptable UnHealthy
R704 Old OverWeight High Low Low M.L.UnAcceptable UnHealthy
R705 Old OverWeight High Low Low UnAcceptable VeryUnHealthy
R706 Old OverWeight High Low Balanced Acceptable MediumHealthy
R707 Old OverWeight High Low Balanced M.L.UnAcceptable UnHealthy
R708 Old OverWeight High Low Balanced UnAcceptable VeryUnHealthy
R709 Old OverWeight High Low High Acceptable UnHealthy
R710 Old OverWeight High Low High M.L.UnAcceptable UnHealthy
R711 Old OverWeight High Low High UnAcceptable VeryUnHealthy
R712 Old OverWeight High Balanced Low Acceptable MediumHealthy
R713 Old OverWeight High Balanced Low M.L.UnAcceptable UnHealthy
R714 Old OverWeight High Balanced Low UnAcceptable VeryUnHealthy
R715 Old OverWeight High Balanced Balanced Acceptable Healthy
R716 Old OverWeight High Balanced Balanced M.L.UnAcceptable MediumHealthy
R717 Old OverWeight High Balanced Balanced UnAcceptable VeryUnHealthy
R718 Old OverWeight High Balanced High Acceptable UnHealthy
R719 Old OverWeight High Balanced High M.L.UnAcceptable UnHealthy
R720 Old OverWeight High Balanced High UnAcceptable VeryUnHealthy
R721 Old OverWeight High High Low Acceptable UnHealthy
R722 Old OverWeight High High Low M.L.UnAcceptable UnHealthy
R723 Old OverWeight High High Low UnAcceptable VeryUnHealthy
R724 Old OverWeight High High Balanced Acceptable UnHealthy
R725 Old OverWeight High High Balanced M.L.UnAcceptable UnHealthy
R726 Old OverWeight High High Balanced UnAcceptable VeryUnHealthy
118 M.-H. Wang et al.
123
Fig. 6 Surface view for OMAS a Inputs (X-PCP and Y-PCC) output
(HDS), b Inputs (X-PCF and Y-PCP) output (HDS), c Inputs (X-PCFand Y-PCC) output (HDS), d Inputs (X-CD and Y-PCC) output
(HDS), e Inputs (X-CD and Y-PCP) output (HDS), and f Inputs
(X-CD and Y-PCF) output (HDS)
Table 2 continued
Rule no. Input fuzzy variables Output fuzzy variable
Age BMI PCC PCP PCF CD HDS
R727 Old OverWeight High High High Acceptable UnHealthy
R728 Old OverWeight High High High M.L.UnAcceptable UnHealthy
R729 Old OverWeight High High High UnAcceptable VeryUnHealthy
Ontology-based multi-agents for intelligent healthcare applications 119
123
computer network. \FUZZYTERM[ uses one attribute,
name used to define the linguistic value associate with
fuzzy concept. Fuzzy shape tags, used to complete the
definition of fuzzy concept, are: \TRIANGULAR-
SHAPE[, \LINEARSHAPE[, \TRAPEZOIDSHAPE[,
\SSHAPE[, \ZSHAPE[, and \PISHAPE[. Every
shaping tag uses a set of attributes which defines the real
outline of corresponding fuzzy set. The number of these
attributes depends on the chosen fuzzy set shape.
The root of fuzzy rulebase component is modeled by the
\RULEBASE[ tag which defines a fuzzy rule set. The
\RULEBASE[ tag uses two attributes: inferenceEngine
and ip. The former is used to define inference operator
type: MinMaxMinMamdani or LarsonProduct. The latter
defines the network location of the set of rules used in
fuzzy controller. In order to define the single rule, the
\RULE[ tag is used. The tags used by \RULE[ are: id,
connector, weight, and ip. (1) The id attribute permits to
identify the rule; (2) connector is used to define the logical
operator used to connect the different clauses in antecedent
part; (3) weight defines the importance of rule during
inference engine time; (4) ip defines the location of rule in
the computer network. The definition of antecedent and
consequent rule part is obtained by using \ANTECED-
ENT[ and \CONSEQUENT[ tags. \CLAUSE[ tag is
used to model the fuzzy clauses in antecedent and conse-
quent part. In order to treat the fuzzy operator ‘‘not’’ in
clauses, the tag \CLAUSE[ uses the boolean attribute
‘‘not’’. To complete the definition of fuzzy clause, the
\VARIABLE[, \TERM[, and \TSKPARAM[ have to
be used. In particular, the pair ‘‘\VARIABLE[,
\TERM[’’ is used to define fuzzy clauses in antecedent
and consequent part of Mamdani controllers rules as well
as in antecedent part of TSK controllers rules. While, the
pair ‘‘\VARIABLE[, \TSKPARAM[’’ is used to model
the consequent part of TSK controllers rules.
3.3 FML-based intelligent healthcare application
Based on the FML, an FML editor, developed by the LASA
Laboratory, University of Salerno, Italy, is used to construct
the knowledge base and rule base of the OMAS (Lee et al.
2009; Wang et al. 2009). The knowledge base describes
fuzzy concepts of the OMAS, including fuzzy variables,
fuzzy terms, and membership functions of fuzzy sets. Con-
versely, the rule base describes the fuzzy rule set, including
the antecedent and consequent rules. Figure 5 shows the
knowledge base and rule base of the OMAS in FML.
Table 1 lists the part of FML view of intelligent
healthcare applications (variables and rules definition). It
has one output fuzzy variable Healthy Diet Status (HDS),
729 fuzzy rules, and six input fuzzy variables—Age, BMI,
PCC, PCP, PCF, and CD. Each fuzzy variable has several
fuzzy terms. For example, fuzzy variable Age has three
ConvenientStore
OntologyDomain Experts
FML Editor
Protege
FML
OWLOntology
Repository
Personal Meal Input
Internet
Ontology-based Multi-AgentS (OMAS)
Healthy Diet Status Repository
Food
Personal Knowledge
Agent
FuzzyInference
Agent
SemanticGeneration
Agent
HealthcareDomain Experts
Utilization Phase
Construction Phase
Fig. 7 Structure of the OMAS
120 M.-H. Wang et al.
123
fuzzy terms, namely, Young, Middle, and Old. In particular,
our systems uses 729 fuzzy rules corresponding to all
possible combinations of input terms (#terms#vari-
ables = 36 = 729). The ideas behind the construction of the
fuzzy rules are as follows. From the view point of the
nutritionists, the food eaten is healthy or not depends on the
amount of the carbohydrate, protein, and fat, as well as
difference between actual calories people consume and
planned caloric intake set by nutritionists. Additionally,
based on the personal height, weight, age, and individual
lifestyle, the nutritionists set the planned caloric intake for
each person and the BMI is acquired. Therefore, Age, BMI,
PCC, PCP, PCF, and CD are considered as the input fuzzy
variables of the OMAS FML, and then HDS is obtained
after the fuzzy inference mechanism. The healthier the
food eaten is (1) the more balanced the value PCC, PCF,
and PCF are; as well as (2) the closer to the planned caloric
intake the actual calories people consume. Hence, the
ontology domain experts constructed the fuzzy rules
according to these criteria and Table 2 lists part of the
constructed fuzzy rules of the OMAS, where M. L. UnAc-
ceptable means MoreOrLessAcceptable.
3.4 Example of the OMAS
Based on the constructed fuzzy rules built by the ontology
domain experts, the output 3-dimensional surfaces are
constructed based on the OMAS. Figure 6 represents the
surface view for OMAS.
Major trends can be observed in the following rule
descriptions. (1) The HDS does increase as the PCC
approaches the balanced state (roughly 55–65%). (2) The
HDS does increase as the PCP approaches the balanced
state (roughly 10–20%). (3) The HDS does increase as PCF
approaches the balanced state (about 25–35%). (4) The
HDS does increase as the CD approaches the acceptable
state (about 0–50 kcal). (5) If PCC is balanced, PCP is
balanced, PCF is balanced, and CD is acceptable, then
HDS increases. Based on the major trends (Fig. 6), the
behavior of the proposed OMAS meets the nutritional
principles; that is, eating balanced foods improves one’s
health. Hence, the proposed approach is feasible for heal-
thy diet evaluation, which will help people create healthy
eating habits.
4 Ontology-based multi-agents for healthy diet
evaluation
This section introduces the ontology-based multi-agents
(OMAS) for healthy diet evaluation. Section 4.1 briefly
describes of the OMAS structure, which has three agents—
a personal knowledge agent, a fuzzy inference agent, and a
semantic generation agent. The details of each agent are
given in Sections 4.2, 4.3, and 4.4.
4.1 Structure of the ontology-based multi-agents
Figure 7 shows OMAS structure, including a construction
phase and a utilization phase, and the OMAS operates as
follows:
• Construction Phase: (1) Nutritional information of
foods is gathered from the Internet and convenient
stores in Taiwan. (2) There are two kinds of domain
experts, including ontology domain experts and health-
care domain experts, involving the experiments shown
in this paper. The ontology domain experts are
responsible for building ontology and setting up rules.
The healthcare domain experts are to evaluate the
performance of the proposed approach. (3) The ontol-
ogy domain experts then use Protege software (Noy and
McGuinness 2001) to construct the food ontology,
which contains nutritional facts for each food such as
amounts of nutrients, calories, and portion size. (4)
Brief personal profiles of users, containing such data as
sex, age, height, and weight, are also built into the
personal profile ontology by domain experts. (5)
Domain experts use the FML editor to build the OMAS
knowledge base and rule base.
• Utilization Phase: The OMAS performs the following
actions. (1) Find a user’s personal profile. (2) Acquire
necessary dietary knowledge by analyzing nutritional
facts for foods eaten, calculate the percentage of
calories from nutrients, and identify the planned dietary
goal. (3) Infer healthy diet status. (4) Generate semantic
sentences and output them to the user. (5) The
generated semantic descriptions for foods eaten are
stored in the healthy diet status repository. (6) The
healthcare domain experts evaluate the performance of
the proposed approach. (7) Last, providing the output as
a reference for users to establish a healthy lifestyle.
4.2 Personal knowledge agent
The personal knowledge agent plays a role in the retrieval of
personal profile data, such as age, sex, height, and weight,
Table 3 Harris–Benedict Equation
Sex Basal metabolic rate (BMR)
Male 66 ? (13.7 9 Weight) ? (5 9 Height) - (6.8 9 Age)
Female 655 ? (9.6 9 Weight) ? (1.8 9 Height) - (4.7 9 Age)
Ontology-based multi-agents for intelligent healthcare applications 121
123
Table 4 Algorithm of the
personal knowledge agentPersonal knowledge agent algorithm Input: 1. Input the ontology repository, including food ontology, personal profile ontology, and FML-based knowledge
base and rule base. 2. Input the foods eaten set M
{[ N1 MainCourseMainCourse ,..., ],
[ Q1 SideDishSideDish ,..., ],
[ R1 DessertDessert ,..., ],
[ L1 BeverageBeverage ,..., ]}
/*where (1) N, Q, R, and L denote the number of food eaten grouped into main course, side dish, dessert, and beverage, respectively. (2) Foods eaten means that the eaten food that the user inputs via the OMAS platform.*/
3. Input the portions of each food eaten set P
{[ N1 MainCoursePortionMainCoursePortion _,...,_ ],
[ Q1 SideDishPortionSideDishPortion _,...,_ ],
[ R1 DessertPortionDessertPortion _,...,_ ],
[ L1 BeveragePortionBeveragePortion _,...,_ ]}
/*where the portions of each food eaten means the portions of the food that the user eats. */ Output:
AgeSet , BMISet , PCCSet , PCPSet , PCFSet , and CDSet
Method: Step1: If user’s identification is passed Then
Step1.1: Retrieve the user’s Age ( Value Age), Height(Value Height), and Weight(Value Weight) from the ontology
repository to calculate the user’s BMI by Value BMI2
HeightWeight ValueValue
Step1.2: Add Value Age to AgeSet and add Value BMI to BMISet
Step2: Retrieve nutrition facts (calories per portion, the number of carbohydrate, protein, and fat grams contained in one portion) of eaten main courses, side dishes, desserts, and beverages from the ontology repository.
C{[ N1 MainCourseCMainCourseC _,...,_ ],
[ Q1 SideDishCSideDishC _,...,_ ],
[ R1 DessertCDessertC _,...,_ ],
[ L1 BeverageCBeverageC _,...,_ ]}
teCarbohydraG
{[ NteCarbohydra1teCarbohydra MainCourseGMainCourseG _,...,_ ],
[ QteCarbohydra1teCarbohydra SideDishGSideDishG _,...,_ ],
[ RteCarbohydra1teCarbohydra DessertGDessertG _,...,_ ],
[ LteCarbohydra1teCarbohydra BeverageGBeverageG _,...,_ ]}
ProteinG
{[ NProtein1Protein MainCourseGMainCourseG _,...,_ ],
[ QProtein1Protein SideDishGSideDishG _,...,_ ],
[ RProtein1Protein DessertGDessertG _,...,_ ],
[ LProtein1Protein BeverageGBeverageG _,...,_ ]}
FatG
{[ NFat1Fat MainCourseGMainCourseG _,...,_ ],
[ QFat1Fat SideDishGSideDishG _,...,_ ],
[ RFat1Fat DessertGDessertG _,...,_ ],
[ LFat1Fat BeverageGBeverageG _,...,_ ]}
Step3: Calculate the total calories intake, the total calories from carbohydrate, protein, and fat, respectively, by
Step3.1: ∑ × PCC Actual
Step3.2: 4)( ××∑ PGC teCarbohydrateCarbohydra
Step3.3: 4)( ××∑ PGC ProteinProtein
Step3.4: 9)( ××∑ PGC FatFat
Step4: Calculate the values of PCC, PCP, and PCF by
Step4.1: ValuePCC ( teCarbohydraC / ActualC ) × 100% and add Value PCC to PCCSet
Step4.2: Value PCP ( ProteinC / ActualC ) × 100% and add Value PCP to PCPSet
Step4.3: ValuePCF ( FatC / ActualC ) × 100% and add Value PCF to PCFSet
Step5: Retrieve the planned calories needs ( PlannedC ) from the ontology repository
Setp6: Calculate the value of CD by
Value CD | PlannedC - ActualC | and add Value CD to CDSet
Setp7: End
122 M.-H. Wang et al.
123
from the personal profile ontology. With this information,
the personal knowledge agent can determine user’s BMI and
the planned daily caloric intake using the Harris–Benedict
equation (Frankenfield et al. 1998) (Table 3).
Additionally, the personal knowledge agent further
examines the amount of carbohydrate, protein, and fat
grams for one portion in the collected meal records using
the food ontology. The number of calories contained in one
Age
Age
1
20 30 40
Young Middle Old
BMI (kg/m^2)
BMI
1
Under-Weight
PCC (%)
PCC
0
1
PCP (%)0
PCP
1
PCF (%)0
PCF
1
CD (kcal)0
CD
1
Normal OverWeight
Low Balanced High Low Balanced High
Low Balanced High Acceptable More-or-LessUnAcceptable UnAcceptable
HDS0
HDS
1
Very-UnHealthy
UnHealthy Medium-Healthy
Healthy VeryHealthy
50 60 15 20 25 30 35 40
10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60 70 80 90 100
10 20 30 40 50 60 70 80 90 100 25 50 75 100 125 150 175 200 225 250
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
(g)
(e)
(c)
(a) (b)
(d)
(f)
Fig. 8 Trapezoidal membership functions for fuzzy variables a Age, b BMI, c PCC, d PCP, e PCF, f CD, and g HDS
Ontology-based multi-agents for intelligent healthcare applications 123
123
portion is also acquired. With these nutritional facts for
foods consumed, the personal knowledge agent transforms
these facts into actual calories, percentage of calories from
carbohydrate, percentage of calories from protein, and
percentage of calories from fat. Finally, the personal
knowledge agent retrieves planned daily caloric intake to
calculate the caloric difference between actual calories and
planned caloric intake. Table 4 lists the algorithm of the
personal knowledge agent.
4.3 Fuzzy inference agent
The main task of the fuzzy inference agent is to infer the
level of a user achieving a healthy dietary state according
to the constructed knowledge base and rule base of the
OMAS. First, five input fuzzy variables, Age, BMI, PCC,
PCP, PCF, and CD, as well as one output fuzzy variable,
HDS, are considered. In this paper, a trapezoidal mem-
bership function for a fuzzy set (FS), denoted by Eq. 1, is
Table 5 Algorithm of the fuzzyinference agent
Fuzzy Inference Agent Algorithm Input: 1. Input the ontology repository, including food ontology, personal profile ontology, and FML-based knowledge base and rule base. 2. AgeSet , BMISet , PCCSet , PCPSet , PCFSet , and CDSet
Output: Healthy diet status set HDSSet
Method: Step1: Retrieve the knowledge base of the OMAS FML from the ontology repository and parse it to get the input fuzzy set ( inA ) and output fuzzy set ( outA )
inA ={ AgeYoung, AgeMiddle, AgeOld, BMILow, BMIMedium, BMIHigh, PCCLow, PCCBalanced, PCCHigh, PCPLow,
PCPBalanced, PCPHigh, PCFLow, PCFBalanced, PCFHigh, CDAcceptable, CDMore-or-LessUnAcceptable, CDUnAcceptable}outA ={HDSVeryUnHealthy, HDSUnHealthy, HDSMediumHealthy, HDSHealthy, HDSVeryHealthy}
Step2: Retrieve the rule base of the OMAS FML from the ontology repository and parse it to get the fuzzy inference rules set FIR = {Rule1, Rule2, …, Rule K}Step3: Implement the fuzzy inference
Let )],,,,,[( CDPCFPCPPCCBMIAge ValueValueValueValueValueValueX
Step3.1: For k 1 to K /*K denotes the number of fuzzy rules*/ Step3.1.1: Calculate the matching degree of the Rule k by
))(( XMINinAk μμ
Step3.1.2: Calculate the center of area of the Rule k by
)(_ _ kout COAkAy μ
Step3.2: For t 1 to T /*T means the number of linguistic terms of the output fuzzy variable, HDS, that is, T = 5 in this paper.*/Step3.2.1: Calculate the membership values of X to the fuzzy classes tF by )( kAt out
yMAXy
/*where (1) Fuzzy classes mean the linguistic terms of the output fuzzy variable (HDS), that is, VeryUnHealthy , UnHealthy, MediumHealthy, Healthy, and VeryHealthy in this paper, and (2) tF
means the fuzzy class for all of fuzzy rules and each fuzzy class is an aggregation of the fired rules that have the same consequences.*/
Step3.2.2: Defuzzify into a crisp value by
∑∑==
T
tt
T
tttHDS wywValue
11
/*where tw means the weight for ty */
Step3.2.3: Add HDSValue to HDSSet
Setp4: End
Table 6 Sentence patterns Semantic Analysis Sentence:The eaten items at meal by this user exhibit that the person is at [FNAge: Young , Middle, Old] age and the
body mass index is [FNBMI: UnderWeight, Normal, OverWeight ], meanwhile percentage of calories from carbohydrate is [FNPCC: Low, Balanced, High], percentage of calories from protein is [FNPCP: Low, Balanced, High], percentage of calories from fat is [FNPCF: Low, Balanced, High], and caloric difference is [FNCD: Acceptable, More-or-LessUnAcceptable, UnAcceptable].Semantic Decision Sentence:
The OMAS justifies that the level of healthy diet status for meal is [FNHDS: VeryUnHealthy, UnHealthy, MediumHealthy, Healthy, VeryHealthy ]. (Level: [0, 1])
124 M.-H. Wang et al.
123
used by the domain experts according to the past heuristic
experience for simplifying computational complexity.
The FS is specified by four parameters FS(x: param1,
param2, param3, param4) and can be expressed as
[param1, param2, param3, param4] (Lee and Wang 2008).
Another reason for adopting the trapezoidal membership
function in this paper is that when param2 equals param3,
then the trapezoidal membership function will be reduced
to the triangular membership function. Fuzzy variable Age
has three linguistic terms, AgeYoung, AgeMiddle, and AgeOld,
that express user’s age, whose trapezoidal membership
functions are [20, 20, 25, 30], [25, 33, 38, 50], and [45, 50,
60, 60], respectively. According to the BMI definitions (1)
Underweight, BMI \ 18.5; (2) Normal, 18.5 B BMI \ 24;
(3) Overweight, 24 B BMI \ 30; (4) Obese, BMI C 30,
the BMI fuzzy variable defines three linguistic terms,
namely, BMIUnderWeight, BMINormal, and BMIOverWeight,
whose trapezoidal membership functions are [15, 15, 18.5,
20], [18.5, 20, 22, 24], and [22, 24, 40, 40], respectively.
The suggested percentages of calories from carbohy-
drate, protein, and fat are 55–65, 10–20, and 25–35%,
respectively. Hence, the linguistic terms of fuzzy variable
Table 7 Algorithm of the
semantic generation agentSemantic Generation Agent Algorithm Input: 1. Input the ontology repository2. Healthy diet status set HDSSet
3. Input fuzzy set inA and output fuzz set outA
inA ={ AgeYoung, AgeMiddle, AgeOld, BMILow, BMIMedium, BMIHigh, PCCLow, PCCBalanced, PCCHigh, PCPLow,
PCPBalanced, PCPHigh, PCFLow, PCFBalanced, PCFHigh, CDAcceptable, CDMore-or-LessUnAcceptable, CDUnAcceptable}outA ={HDSVeryUnHealthy, HDSUnHealthy, HDSMediumHealthy, HDSHealthy, HDSVeryHealthy}
Output: Semantic analysis for the eaten meal Method: Step1: Let )],,,,,[( CDPCFPCPPCCBMIAge ValueValueValueValueValueValueX
Step1.1: ))(),(),(( AgeAgeAgeAgeAgeAgeAge ValueValueValueMAXOldMiddleYoung
μμμμ and save the
linguistic term to AgeLT
Step1.2: ))(),(),(( BMIBMIBMIBMIBMIBMIBMI ValueValueValueMAXOverweightNormaltUnderweigh
μμμμ and save
the linguistic term to BMILT
Step1.3: ))(),(),(( PCCPCCPCCPCCPCCPCCPCC ValueValueValueMAXHighBalancedLow
μμμμ and save the
linguistic term to PCCLT
Step1.4: ))(),(),(( PCPPCPPCPPCPPCPPCPPCP ValueValueValueMAXHighBalancedLow
μμμμ and save the
linguistic term to PCPLT
Step1.5: ))(),(),(( PCFPCFPCFPCFPCFPCFPCF ValueValueValueMAXHighBalancedLow
μμμμ and save the
linguistic term to PCFLT
Step1.6: ))(),(),(( CDCDCDCDCDCDCD ValueValueValueMAXleUnAcceptabptableLessUnAcceorMoreAcceptable
μμμμ−−
and
save the linguistic term to CDLT
Step1.7:))(),(
),(),(),((
HDSHDSHDSHDS
HDSHDSHDSHDSHDSHDSHDS
ValueValue
ValueValueValueMAX
yVeryHealthHealthy
thyMediumHealUnHealthythyVeryUnHeal
μμ
μμμμ
and save the linguistic term to HDSLT
Step2: Output meal’s healthy state using semantic sentences The eaten items at meal by this user exhibit that the person is at AgeLT age and the body mass index
is BMILT , meanwhile percentage of calories from carbohydrate is PCCLT , percentage of calories from
protein is PCPLT , percentage of calories from fat is PCFLT , and caloric difference is CDLT
The OMAS justifies that the level of healthy diet state for meal is HDSLT (Level: HDSμ )
Step3: End
FS x : param1; param2; param3; param4ð Þ ¼
0 x\param1
x� param1ð Þ= param2� param1ð Þ param1� x\param2
1 param2� x� param3
param4� xð Þ= param4� param3ð Þ param3\x� param4
0 x [ param4
8>>>><
>>>>:
ð1Þ
Ontology-based multi-agents for intelligent healthcare applications 125
123
PCC are PCCLow, PCCBalanced, and PCCHigh, whose trap-
ezoidal membership functions are [0, 0, 50, 55], [50, 55,
65, 70], and [65, 70, 100, 100], respectively. The linguistic
terms of fuzzy variable PCP are PCPLow, PCPBalanced, and
PCPHigh, whose trapezoidal membership functions are [0,
0, 5, 10], [5, 10, 20, 25], and [20, 25, 100, 100], respec-
tively. The linguistic terms of fuzzy variable PCF are
PCFLow, PCFBalanced, and PCFHigh, whose trapezoidal
membership functions are [0, 0, 20, 25], [20, 25, 35, 40],
and [35, 40, 100, 100], respectively. The membership
functions of fuzzy variable CD are CDAcceptable, CDMore-or-
LessUnacceptable, and CDUnacceptable, whose trapezoidal
membership functions are [0, 0, 50, 100], [70, 100, 150,
200], and [150, 200, 5000, 5000], respectively.
Second, the fuzzy inference mechanism performs
membership functions to compute the membership degrees
for each meal recorded in the ontology repository. The
MIN operator is then used to combine the degree of match
between each fuzzy rule’s conditions. Third, the area center
of each rule is calculated. The HDS fuzzy variable is uti-
lized with five linguistic terms to represent the level of
healthy dietary state for the meal eaten. The linguistic
terms are HDSVeryUnHealthy, HDSUnHealthy, HDSMediumHealthy,
HDSHealthy, and HDSVeryHealthy, whose trapezoidal mem-
bership functions are [0, 0, 0.1, 0.25], [0.1, 0.25, 0.25, 0.5],
[0.25, 0.5, 0.5, 0.75], [0.5, 0.75, 0.75, 0.9], and [0.75, 0.9,
1.0, 1.0], respectively. Fourth, the fuzzy inference mecha-
nism performs the MAX operation to integrate triggered
rules with the same consequences and outputs the maxi-
mum area center. The parameters of all membership
functions are determined by domain experts. Figures 8a–g
show the trapezoidal membership functions for fuzzy
variables Age, BMI, PCC, PCP, PCF, CD, and HDS,
respectively. Finally, the level of a healthy dietary status of
a meal eaten is inferred. Table 5 shows the fuzzy inference
agent algorithm.
4.4 Semantic generation agent
According to sentence patterns (Table 6), the semantic
generation agent retrieves the inferred results obtained by
the fuzzy inference agent and then transforms these inferred
results into knowledge to present healthy dietary status
using semantic descriptions.
Table 7 shows the semantic generation agent algorithm.
For example, if a 23-year-old woman eats two portions of
strawberry chocolate and drinks one portion of Coca-Cola,
the OMAS indicates that the level of a healthy dietary state
for such a meal is very unhealthy when the person is young
and their body mass is underweight, the percentage of
calories from carbohydrates is high, the percentage of
calories from protein is low, the percentage of calories
from fat is low, and the caloric difference is unacceptable.
5 Experimental results
The OMAS platform was implemented by ASP.Net (Web
Inference), Microsoft C# programming language (OMAS),
and Java (FML and Visual Editor). This paper focuses on
people aged 20–60 years old and with average levels of
Table 8 Personal information of the involved people
No. Sex Age Height (cm) Weight (kg)
1 Male 30 170 60
2 Male 24 169 71
3 Male 24 166 73
4 Male 25 172 85
5 Male 23 171 68
6 Male 26 178 81
7 Male 24 165 65
8 Male 27 173 75
9 Male 31 167 70
10 Male 28 181 88
11 Female 23 156 50
12 Female 23 161 51
13 Female 24 170 44
14 Female 24 168 48
15 Female 25 170 52
16 Female 25 156 46
17 Female 24 163 52
18 Female 26 155 54
19 Female 27 158 58
20 Female 28 165 51
Table 9 Part of the meal records of the subject 1
Meal no. Main courses (portion) Side dishes (portion) Desserts (portion) Beverages (portion)
1 Hawaii pizza (1) Composited fruits (1) Egg pudding (1) Green tea (1)
9 Royal lunch box vinegar chicken (1) Grapes toast (1) Milk Chocos (1) Seattle black coffee (1)
10 Glutinous oil rice (1) Composited fruits (1) Vanilla chocolate Bar (1) Mineral water (1)
20 American smoked sausage burger (1) Gratin cheese potato (1) Strawberry chocolate (1) Oat milk (1)
126 M.-H. Wang et al.
123
physical activity. Twenty students attending National
University of Tainan (NUTN), Taiwan, were enrolled in
this experiment. These subjects recorded their dinner meals
on Monday–Friday for about 1 month. Therefore, 20 die-
tary records were collected for each subject for a total of
400 dietary records. Table 8 lists the personal information
of these subjects. There are two kinds of domain experts,
including ontology domain experts and healthcare domain
experts, involved in those following experiments shown in
this section. The healthcare domain experts did those
experimental evaluations and the ontology domain experts
built the fuzzy rules together.
5.1 Evaluation results of OMAS
Table 9 lists meals 1, 9, 10, and 20 eaten by subject 1. In
Fig. 9, the OMAS indicates that the level of a healthy
dietary state for the meal 10 eaten by subject 1 is
VeryHealthy.
Table 10a lists the OMAS outcomes for meals 1, 9, 10,
and 20 of subject 1; these outcomes were VeryUnHealthy,
VeryUnHealthy, VeryHealthy, and Healthy, respectively.
This OMAS result for meal 10 is exactly the same as that
generated by the domain expert, meaning that both the
domain expert and the OMAS categorized this meal as
VeryHealthy. Therefore, eating meal 10 is a healthy choice
for subject 1. However, subject 1 should not eat unhealthy
meal 9. In other words, the proposed OMAS can inform
subject 1 about which foods he should avoid and which
foods he should eat. Additionally, the experimental results
of the subject 12 are also described. Table 10b lists the
outcomes of meals 3, 5, 8 and 16 eaten by subject 12.
Table 11 lists some of collected meal records for subject
12.
5.2 Analysis of OMAS
The second experiment is still to consider subject 1 and
subject 12 as examples to assess the variance in the level of
healthy dietary status evaluated by the domain expert and
the OMAS.
Figures 10a, b show the charts of the level of a healthy
dietary status evaluated by the domain expert and the
OMAS for each meal record for subject 1 and subject 12,
respectively. Figure 10a reveals that the difference in
generated level of a healthy dietary status by the domain
expert and the OMAS for meals 1–20 is \0.25, excluding
meal 1. Figure 10b indicates that the difference between
the level of healthy dietary status by the domain expert and
the OMAS was \0.2 for all meal records.
5.3 Accuracy, precisions, and recall for OMAS
The third experiment evaluates the performance of the
accuracy, precision, and recall for the OMAS. Table 12
shows four possible outcomes of a single prediction (Lee
and Wang 2007). The accuracy, precision, and recall are
calculated by Eqs. 2, 3 and 4, respectively. In this
Fig. 9 Screenshot of meal 10 of the subject 1
Ontology-based multi-agents for intelligent healthcare applications 127
123
Table 10 Outcomes of part of meals of the subject 1 and subject 12
Age BMI PCC PCP PCF CD
Subject 1
Meal 1 30 20.76 56.71 7.56 35.73 156.22
The eaten items at meal by this user exhibit that the person is at Middle age and the body mass index is Normal, meanwhile percentage
of calories from carbohydrate is Balanced, percentage of calories from protein is Low, percentage of calories from fat is Balanced,
and caloric difference is More-or-LessUnAcceptable
The OMAS justifies that the level of healthy diet state for meal is VeryUnHealthy. (Level: 0.37)
The domain expert justifies that the meal is Healthy
Meal 9 30 20.76 58.85 11.07 30.08 1150.82
The eaten items at meal by this user exhibit that the person is at Middle age and the body mass index is Normal, meanwhile percentage
of calories from carbohydrate is Balanced, percentage of calories from protein is Balanced, percentage of calories from fat is
Balanced, and caloric difference is UnAcceptable
The OMAS justifies that the level of healthy diet state for meal is VeryUnHealthy. (Level: 0.1)
The domain expert justifies that the meal is VeryUnHealthy
Meal 10 30 20.76 64.5 10.75 24.75 48.22
The eaten items at meal by this user exhibit that the person is at Middle age and the body mass index is Normal, meanwhile percentage
of calories from carbohydrate is Balanced, percentage of calories from protein is Balanced, percentage of calories from fat is Low,
and caloric difference is Acceptable
The OMAS justifies that the level of healthy diet state for meal is VeryHealthy. (Level: 0.9)
The domain expert justifies that the meal is VeryHealthy
Meal 20 30 20.76 55 15 30 135.62
The eaten items at meal by this user exhibit that the person is at Middle age and the body mass index is Normal, meanwhile percentage
of calories from carbohydrate is Balanced, percentage of calories from protein is Balanced, percentage of calories from fat is
Balanced, and caloric difference is More-or-LessUnAcceptable
The OMAS justifies that the level of healthy diet state for meal is Healthy. (Level: 0.71)
The domain expert justifies that the meal is Healthy
Subject 12
Meal 3 23 19.68 58.82 7.97 33.22 1443.84
The eaten items at meal by this user exhibit that the person is at Young age and the body mass index is UnderWeight, meanwhile
percentage of calories from carbohydrate is Balanced, percentage of calories from protein is Low, percentage of calories from fat is
Balanced, and caloric difference is UnAcceptable
The OMAS justifies that the level of healthy diet state for meal is VeryUnHealthy. (Level: 0.1)
The domain expert justifies that the meal is VeryUnHealthy
Meal 5 23 19.68 57.66 7.21 35.14 69.84
The eaten items at meal by this user exhibit that the person is at Young age and the body mass index is UnderWeight, meanwhile
percentage of calories from carbohydrate is Balanced, percentage of calories from protein is Low, percentage of calories from fat is
Balanced, and caloric difference is Acceptable
The OMAS justifies that the level of healthy diet state for meal is UnHealthy. (Level: 0.59)
The domain expert justifies that the meal is Healthy
Meal 8 23 19.68 76.03 1.65 22.31 220.84
The eaten items at meal by this user exhibit that the person is at Young age and the body mass index is UnderWeight, meanwhile
percentage of calories from carbohydrate is High, percentage of calories from protein is Low, percentage of calories from fat is Low,and caloric difference is UnAcceptable
The OMAS justifies that the level of healthy diet state for meal is VeryUnHealthy. (Level: 0.11)
The domain expert justifies that the meal is VeryUnHealthy
Meal 16 23 19.68 56.48 9.97 33.55 820.44
The eaten items at meal by this user exhibit that the person is at Young age and the body mass index is UnderWeight, meanwhile
percentage of calories from carbohydrate is Balanced, percentage of calories from protein is Low, percentage of calories from fat is
Balanced, and caloric difference is UnAcceptable
The OMAS justifies that the level of healthy diet state for meal is VeryUnHealthy. (Level: 0.1)
The domain expert justifies that the meal is VeryUnHealthy
128 M.-H. Wang et al.
123
experiment, the healthcare domain experts first classify
the food eaten into two categories: ‘‘healthy’’ and
‘‘unhealthy.’’ Next, based on various thresholds in the
interval of [0.05, 0.90], the OMAS also classifies the
healthy diet state of the food eaten. Finally, the curves
for accuracy, precision, and recall are acquired according
to Table 12. Figures 11a, b show the curves of the
accuracy, precision, and recall for subject 1 and subject
12, respectively. Herein, a threshold denotes the mem-
bership degree threshold for HDS. Figure 11a reveals
that accuracy is 90% when the threshold is 0.55–0.70
and Fig. 11b shows that accuracy was [80% for most
thresholds. Additionally, Fig. 11 also indicates that recall
and precision are inversely related; that is, as recall
increases, precision decreases.
Table 11 Part of the meal records of the subject 12
Meal no. Main courses (portion) Side dishes (portion) Desserts (portion) Beverages (portion)
3 Gratin curry chicken rice (1) Milk bread with pudding (2) Vanilla chocolate bar (1) Yakult fermented milk (2)
5 – Japanese style corn soup (1) Strawberry wafer roll (1) –
8 – – Strawberry chocolate (2) Coca Cola (1)
16 Rice roll with tempura shrimp (2) Composited fruits (1) Milk Chocos (1) –
Fig. 10 Charts of the level of
the healthy diet status for asubject 1 and b subject 12
Table 12 Classification of results
Actual class Predicted class
Yes No
Yes True positive (TP) False negative (FN)
No False positive (FP) True negative (TN)
Ontology-based multi-agents for intelligent healthcare applications 129
123
Accuracy ¼ TN þ TPð Þ= TN þ FN þ FPþ TPð Þ � 100%
ð2ÞPrecision ¼ TP= TPþ FPð Þ � 100% ð3ÞRecall ¼ TP= TPþ FNð Þ � 100% ð4Þ
5.4 Performance of OMAS
The fourth experiment evaluates the mean square error
(MSE), calculated by Eq. 5, between outcomes of the
domain expert and the OMAS. Figure 12 lists the MSE of
each subject for all meal records; all MSEs are \0.5.
MSE ¼ 1
n
Xn
i¼1
e2i ð5Þ
where n is the total number of subjects, and ei is the out-
come difference between the OMAS and domain expert.
6 Conclusions
While living a healthy life is important, many individuals
have difficulty in determining whether what they eat is
healthy. Therefore, based on the physical characteristics of
an individual and opinions about diet, the OMAS is pro-
posed to represent semantic descriptions such that indi-
viduals can understand whether the food they eat is
healthy. The proposed OMAS contains three sub-agents, a
personal knowledge agent, a fuzzy inference agent, and a
semantic generation agent. Experimental results indicate
that the proposed system enables the intelligent behavior
for a suitable healthy diet for users based on the con-
structed ontology. The proposed agent helps people eat
healthily and keep their bodies in shape, and reduces the
workload of medical experts. Additionally, according to
the viewpoint of the nutritionists, the food group balance is
Fig. 11 Curves of the
accuracy, precision, and recall
for a subject 1 and b subject 12
Fig. 12 MSE of the each
subject
130 M.-H. Wang et al.
123
also a key factor to evaluate whether the food eaten is
healthy or not. Therefore, adding the food group balance to
the proposed OMSA will be one of the future research
works. Additionally, the concept of a type-2 fuzzy set and a
learning mechanism for follow-up research will be also
considered in the future.
Acknowledgments This work is supported by the National Science
Council (NSC) of Taiwan under the grant NSC97-2221-E-024-011-
MY2 and NSC98-2221-E-024-009-MY3. The authors would like to
thank all subjects for their involving this research project. Ted Knoy
is appreciated for his editorial assistance.
References
Acampora G, Loia V (2005a) Using FML and fuzzy technology in
adaptive ambient intelligence environments. Int J Comput Intell
Res 1(2):171–182
Acampora G, Loia V (2005b) Fuzzy control interoperability and
scalability for adaptive domotic framework. IEEE Trans Ind
Inform 1(2):97–111
Caceres C, Fernandez A, Ossowski S, Vasirani M (2006) Agent-based
semantic service discovery for healthcare: an organizational
approach. IEEE Intell Syst 21(6):11–20
Chan V, Ray P, Parameswaran N (2008) Mobile e-Health monitoring:
an agent-based approach. IET Commun 2(2):223–230
Chen RS, Chen DK (2008) Apply ontology and agent technology to
construct virtual observatory. Exp Syst Appl 34(3):2019–2028
Debenham J, Sierra C (2008) Merging intelligent agency and the
Semantic Web. Knowledge Based Syst Arch 21(3):184–191
Ferber J (1999) Multi-Agent Systems: an introduction to distributed
artificial intelligence. Addison-Wesley, New York
Frankenfield DC, Muth ER, Rowe WA (1998) The Harris-Benedict
studies of human basal metabolism: history and limitations.
J Am Diet Assoc 98(4):439–445
Lee CS, Wang MH (2007) Ontology-based intelligent healthcare
agent and its application to respiratory waveform recognition.
Exp Syst Appl 33(3):606–619
Lee CS, Wang MH (2008) Ontological fuzzy agent for electrocar-
diogram application. Exp Syst Appl 35(3):1223–1236
Lee CS, Jian ZW, Huang LK (2005) A fuzzy ontology and its
application to news summarization. IEEE Trans Syst Man
Cybern B 35(5):859–880
Lee CS, Jiang CC, Hsieh TC (2006) A genetic agent using ontology
model for meeting scheduling system. Inf Sci 176(9):131–1155
Lee CS, Wang MH, Acampora G, Loia V, Hsu CY (2009) Ontology-
based intelligent fuzzy agent for diabetes application. In:
Proceeding of the 2009 IEEE Symposium on Computational
Intelligence for Intelligent Agents (IA 2009), Nashville, Ten-
nessee, USA, March 30–April 2, pp 16–22
Moreno A (2006) On the evolution of applying agent technology to
healthcare. IEEE Intell Syst 21(6):8–10
Moreno A, Valls A, Isern D, Sanchez D (2006) Applying agent
technology to healthcare: the CruSMA experience. IEEE Intell
Syst 21(6):63–67
Noy NF, McGuinness DL (2001) Ontology development 101: a guide
to creating your first ontology. Stanford knowledge systems
laboratory technical report KSL-01-05 and Stanford medical
informatics technical report SMI-2001-0880
Orgun B, Vu J (2006) HL7 ontology and mobile agents for
interoperability in heterogeneous medical information systems.
Comput Biol Med 36(7–8):817–836
Reformat M, Ly C (2009) Ontological approach to development of
computing with words based systems. Int J Approx Reason
50(1):72–91
Sanchez FG, Garcı́a RV, Bejar RM, F. Breis JT (2009) An ontology,
intelligent agent-based framework for the provision of semantic
web services. Exp Syst Appl 36(2):3167–3187
US Food and Drug Administration (2009) How to understand and use
the nutrition facts label. http://www.cfsan.fda.gov/*dms/
foodlab.html. Accessed 2 July 2009
Wang MH, Lee CS, Hsieh KL, Hsu CY, and Chang CC (2009)
Intelligent ontological multi-agent for healthy diet planning. In:
Proceeding of the 2009 IEEE International Conference on Fuzzy
System (FUZZ-IEEE 2009), Jeju Island, Korea, Aug. 19–24, pp
751–756
Zunino A, Campo M (2009) Chronos: a multi-agent system for
distributed automatic meeting scheduling. Exp Syst Appl
36(3):7011–7018
Ontology-based multi-agents for intelligent healthcare applications 131
123