ITS662 Chapter 2 - Knowledge Engineering
ITS662 Chapter 2 - Knowledge Engineering
KNOWLEDGE ENGINEERING
OUTLINES:
❑Introduction, or what is knowledge engineering?
TYPICAL Selection
recommending solutions.
Recommending the best option from a list of possible
PROBLEM
alternatives.
Prediction Predicting the future behaviour of an object from its
ADDRESS BY
behaviour in the past.
Classification Assigning an object to one of the defined classes.
INTELLIGENT
Clustering Dividing a heterogeneous group of objects into
homogeneous subgroups.
SYSTEM
Optimisation Improving the quality of solutions until an optimal one is
found.
Control Governing the behaviour of an object to meet specified
requirements in real-time.
PHASE 2: DATA AND KNOWLEDGE ACQUISITION
• Often the data we want to analyse • Often the same facts are represented • Actual data records often contain
store text in EBCDIC coding and differently in different databases. blank fields.
numbers in packed decimal format, • If these differences are not spotted • We normally we would attempt to
while the tools we want to use for and resolved in time, we might find infer some useful information from
building intelligent systems store text ourselves, for example, analysing them.
in the ASCII code and numbers as consumption patterns of carbonated
integers with a single- or double- drinks using data that does not • In many cases, we can simply fill the
precision floating point. include Coca-Cola just because it was blank fields in with the most common
• This issue is normally resolved with stored in a separate database. or average values.
data transport tools that • In other cases, the fact that a
automatically produce the code for particular field has not been filled in
the required data transformation. might itself provide us with very
useful information.
• For example, in a job application
form, a blank field for a business
phone number might suggest that an
applicant is currently unemployed.
HOW DO WE APPROACH KNOWLEDGE ACQUISITION?
Intelligent systems, unlike conventional computer programs, are designed to solve problems that quite
often do not have clearly defined “right” and “wrong” solutions.
To evaluate an intelligent system is , in
fact, to assure that the system performs
the intended task to the user’s satisfaction.
EXPERT SYSTEM
CASE STUDY 1: DIAGNOSTICS EXPERT SYSTEM
Section 1: System Start-up
Problem Action
1.1. System does not start • Check power cords (both ends).
• Check the power strip.
• Check screen brightness.
“I want to develop an • Check phonet connectors.
intelligent system that can • Check keyboard connectors.
• Check pins connectors.
help me to fix malfunctions
of my Mac computer. Will 1.2. System starts and then freezes • Restart the Mac.
• Unhook all SCSI devices and restart the Mac.
an expert system work for • Restart with the shift key down (turns off
this problem?” extensions).
• Remove all extensions and add them back one at a
time. Restart the Mac after each addition. If using
System 7.5 or higher, use Extensions Manager.
1.3. System starts with a Sad Mac • Start with Disk Tools and do a clean reinstall of the
system.
• Run Disk First Aid, MacCheck, or Norton’s Disk
Doctor.
• Start with Disk Tools, and if the hard drive icon
does not show up, call AV Repair.
1.4. System starts with wrong “music” • Check cables.
GENERAL RULE STRUCTURE
In each rule, we include a clause that identifies the current task:
Rule: 1
if task is ‘system start-up’
then ask problem
Rule: 2
if task is ‘system start-up’
and problem is ‘system does not start’
then ask ‘test power cords’
Rule: 3
if task is ‘system start-up’
and problem is ‘system does not start’
and ‘test power cords’ is ok
then ask ‘test the power strip’
Tools range from high-level programming
languages such as LISP, PROLOG, OPS, C and
Java, to expert system shells.
whether the shell supports inexact reasoning and if so, what technique it uses
(Bayesian reasoning, certainty factors or fuzzy logic);
whether the shell has an “open” architecture allowing access to external data
files and programs;
how the user will interact with the expert system (graphical user interface,
hypertext).
KNOWLEDGE
REPRESENTATION
KNOWLEDGE
Declarative knowledge
• my room no. is 2079
Meta-knowledge
• if you want to know about heart attack, please read this book
Heuristic knowledge
• the clouds looks dark and heavy, … heavy rain might fall…
Structural Knowledge
• a cat has four legs
KNOWLEDGE HIERARCHY
Noise: unwanted elements in communication that
can influence the judgment
Data: numeric/alphanumeric string that by
Meta-Knowledge themselves do not have any meaning
Information: data organized so that it is
Knowledge meaningful to the person receiving it
Information Knowledge:
A collection of information that have been organized
and analyzed to make it understandable and
Data applicable to problem solving
consists of symbols, relationship between them and
rules or procedures for manipulating them
Noise
Meta-knowledge: knowledge about other
knowledge
KNOWLEDGE HIERARCHY: EXAMPLES
What is Knowledge?
Consist of symbols, the relationships between them and rules or procedures for manipulating them.
It is a collection of information that have been organized and analyze to make it understandable and
applicable to problem solving.
Not documented
• Example: experience,
observation
KNOWLEDGE
REPRESENTATION: DEFINITION
Knowledge representation is a science of translating
actual knowledge into a format that can be used by
the computer.
Knowledge Representation is the way that
knowledge is stored in a program
This implies that there is a systematic way to store the
information
It also implies that the knowledge is coded into the program
KNOWLEDGE REPRESENTATION: METHODS
Capture the essential features of a problem domain and make that information
accessible to a problem-solving procedures.
Provide a natural framework for expressing problem-solving knowledge where it
should make that knowledge available to the computer and assist the programmer
in its organization.
3 categories:
Object – Object-Attribute-Value (OAV)
Rules
Logic
OBJECT-ATTRIBUTE-VALUE
(OAV)
Refer to particular properties value of object
Eg: The ball’s color is red (assign red to the ball’s color)
The object can be physical (eg: car, books) or abstract (eg:
love, hobby).
The value can be numerical, string or Boolean!.
It could be either single or multi valued from different
attributes and objects.
OBJECT-ATTRIBUTE-VALUE (OAV)
Fact :=: “The chair’s color is red and priced at RM 35.00 ”
Fact :=: “I have a brother named Johnny. The 8 years-old brother likes to play
tennis and football.”
RULE
Rule is a knowledge structure that relates some known information to other
information and that can be concluded or inferred to be known.
Is a form of procedural knowledge → associates given information to some action.
Structure → connects antecedents (premises) and consequents (conclusions).
Statement “IF” → antecedent and “THEN” → consequent
Rule 1:
IF x has a sore throat
AND suspect bacterial infection
THEN patient has strep throat
Rule 2:
IF x temperature is > 37 c
THEN x has a fever
Rule 3:
IF x has been sick > a month
AND x has a fever
THEN suspect bacterial infection
LOGIC
❑The oldest representation existed.
❑Often referred to propositional logic and predicate calculus.
❑Formed well-founded approach to knowledge presentation and reasoning.
❑Implemented using PROLOG programming language.
❑Main structure → more than one atomic word (the smallest semantic meaning.
❑Eg: The ball color is blue => “ball_color_blue”
❑Manipulate basic Boolean logic operations (AND, OR, NOT, IMPLIES,
EQUIVALENCE.)
❑Example:
❑Normal :“Today is raining, therefore I will miss the class”
❑Logic : today_raining → i_will_miss_class
LOGIC: LOGICAL OPERATOR
GENERAL NAME FORMAL NAME SYMBOLS
Not Negation
And Conjunction
Or Disjunction
If… Then/Implies Conditional →
If and only if Biconditional
LOGIC: EXAMPLES
Propositional Logic – Example
Example 1:
Normal: The sky is blue and windy. It is really great for picnic
Logic: sky_blue windy → great_for_picnic
Example 2:
Normal: If the weather is cloudy, then it will be raining. If it is raining, people will stay at
home.
Logic: (weather_cloudy → raining) (raining → people_stay_home).
Example 3:
Normal: I will rather stay if and only if it is raining.
Logic: i_will_stay raining