TN2063: Machine Learning

Download Report

Transcript TN2063: Machine Learning

EXPERT SYSTEM
Dr. Abbas Fadhil M. A. AL-Juboori
Computer Science Dept. – Kerbala
University
[email protected]
[email protected]
1
From the Father of Expert System:
An intelligent program that uses knowledge
and reasoning procedure to solve problems
that require significant human expertise for
their solutions.
- Edward Feigenbaum
From others:
A system that uses human K captured in a computer
to solve problems that ordinarily require human
expertise
Turban & Aronson
(2001)
A computer program that represents and reasons
with K of some specialist subject with a view to
solving problem or giving advice
Jackson (1999)
A computer program designed to model the
problem-solving ability of a human expert
Durkin (1994)
A computer program that emulates the reasoning of Awad (1996)
human experts in a problem domain
As a field,

It is a branch of AI
As a technology,


It is the most widely applied AI technology
Among the first to be commercialized
As an application,


It is a computer program
It ‘transfers’ (i.e. it acquires and represents) practical
knowledge (i.e. expertise/rules of thumb/heuristic) from
human expert to computer

It reasons (or it ‘thinks’) with what it
‘transfers’

It can either


support decision makers (by recommending
decisions) or
‘replace’ them (by making decisions on behalf of
experts, releasing them from routine tasks).

After all, ES replicates a human expert.
An expert is one who possesses
specialized skill, experience, and
knowledge that most people do
not have along with the ability to
apply this knowledge using tricks,
shortcuts, and rules-of-thumb to
resolve a problem efficiently.
Harmon & King (1985)
Therefore, ES possess expertise
 Expertise is
 an extensive, task-specific knowledge held by experts
 hard to capture. Capturing it is a major issue in ES
development, and became a major concern of
Knowledge Acquisition researchers.

With the expertise stored in its knowledge base, ES can
provide expertise-based solutions which are imaginative,
accurate and efficient.
 Expert personnel is a valuable asset for any
organization (as they are good at solving
organizational problems, planning etc.) … yet they
are




Perishable and irreplaceable
Geographically static
Not available 24/7
Emotionally affected
 feel fear, stress etc … like other human beings.
 Costly
 to train and to consult
So, we have good reasons to build an ES!!
3 main reasons:
 To replace human expert
 To assist human expert
 To gain competitive advantage

To replace  to eliminate

Reasons for replacing experts





To preserve their expertise
To disseminate their expertise in less expensive manner
To make expertise available after hours
To make expertise available at several locations
To free experts from routine thus they can focus on the
other critical tasks
 To avoid experts from danger

ES as an aided tool to
 improve human expert’s productivity
 maintain consistency in their decisions
 deal with the complexity of the tasks
 make available the information that is difficult
for experts to recall

Due to the benefits this technology can offer

Exemplar:
 Digital Equipment Corporation
▪ R1/XCON
 American Express
▪ Authorizer’s Assistant
 Coopers & Lybrand
▪ ExperTax
Knowledge base
Interface
Inference engine
User
Working memory
The components actually mimic what is in humans.
=
Knowledge base
Brain
= Inference engine
Short-term memory
=
Working memory
S
E
N
S
O
R
= interface
Long-term memory
Environment
=
People/sensor etc
that provide input
to our brain

Knowledge base  “contains the domain
knowledge”
 Facts
 Heuristics or rules that direct use of knowledge to solve
specific problems in a particular domain.

Typical representation:
 Rules (IF x AND y THEN z @ x  y  z)
 Example (for predicting weather):
▪ IF cloudy = yes AND temperature = low AND humidity = high THEN it
will rain.
▪ IF cloudy = no AND temperature = high AND humidity = low THEN it
will sunny

A storage area for current data
 i.e. facts entered by user during consultation with ES (e.g.
symptoms of a disease)
Input data can also be loaded from external storage
such as databases, spreadsheets or sensors.
 Also a place where intermediate conclusions or the
new facts inferred by ES are stored
 Non-permanent – content will be deleted when the
session ends.

Known as rule interpreter in rule-based ES.
 Is modelled after human expert’s reasoning.
 Typically, inference engine utilized 2 control
strategies:


Backward Chaining (goal driven)
▪

determine fact in the conclusion to prove the conclusion is true.
Forward Chaining (data driven)
▪
premise clause match situation then assert conclusion.

Facilitates all communication between user and ES.
Communication are in natural language style, interactive
and follow closely the conversation between humans.

Two types of interaction:

 ES ask for information through questions, provide the
results and display the explanation.
 User supply answers, receive the results or query the
system (i.e. getting explanation)

Two types of explanation:
 WHY
▪ Explain why the system asked the question.
 HOW
▪ Explain how ES arrived at the conclusion.

Justify the validity of the system’s findings 
increase user confidence and trust
K MANAGER
defines K strategy
initiates K development projects
facilitates K distribution
ENGINEER/
ANALYST
EXPERT
elicits knowledge from
validates
uses
elicits
requirements
from
manages
delivers
analysis models to
manages
KS
USER
designs &
implements
Source: Schreiber et al. (2000)
PROJECT
MANAGER
K SYSTEM
DEVELOPER

Knowledge engineering
 Methodology for building an ES

6 phases of knowledge engineering:
 Problem assessment
 Knowledge acquisition
 Design
 Testing
 Documentation
 Maintenance

Choice of tools and approaches for developing ES includes:
 Programming languages
 Support aids and tools
 Ready-to-use customized packages for industry and
government
 ES shells

Which tools to adopt depends on:
 The nature of the problem
 The skill of the builder
 The function ES is expected to perform (either diagnoses
or monitoring)
Domain expert
•Provide knowledge or method to solve problem
Knowledge Engineer
•Gain knowledge from expert
•Transfer/represent knowledge into a
computer
User
•Can be the end user
or expert himself

ES has been applied to perform/solve the following
task/problem
 Control – meeting certain standards/specifications
 Design – configuring objects under specific constraints
 Diagnosis – inferring malfunction/disease and
recommend solutions/treatment
 Planning – designing actions
 Monitoring – comparing observation to expectation
 Selection – identifying the best choice(s) from a list of
actions

ES has been applied to perform/solve the following
task/problem
 Interpretation – infer situation description from




observation
Prediction – infer likely consequences of the given
situation
Debugging – prescribe remedies for malfunction
Repair – execute a plan to administer a prescribed
remedy
Instruction – diagnose, debug and correct student’s
misconception
BENEFITS
LIMITATIONS
Reduce decision making time
Work well only within a narrow
domain of knowledge
Improve production operations
Can make mistakes
Increase output and productivity
Risk of knowledge quickly become
obsolete
Can be used as tools for staff training Ongoing reliance on experts
Retention of scarce expertise
Knowledge is not always available
Upgrade performance
Difficult to extract expertise from
human experts
Relatively affordable expertise
User lack of trust can impede use
Improve quality of products/services
In general, ES works by matching the facts with its
knowledge base content, and display the output to
user
Modus
Ponens!
R12: A  B
Knowledge base
Inference engine
B
Working
memory
Interface

A
User

In detail, it depends on what control strategy each
ES’s inference engine utilizes, either forward
chaining or backward chaining or both
 The principle of chaining is governed by modus ponens.
ABC
A
B
C
 Chaining signifies linking of a set of pertinent rules.

Goal rule
 A rule in which its conclusion is not a premise of any other
rules in the knowledge base
 E.g.
R1: (A  B)  C  D
R2: D  G  T
R3: P  Q  B
 R2 is the goal rule as its conclusion, T, is NOT one of the
premises of the other rule (i.e. R1 and R3)

Sub-goal rule
 A rule in which its conclusion is also a premise of the other
rules or in the goal rule.
 E.g.
R1: (A  B)  C  D
R2: D  G  T
R3: P  Q  B
 R1 and R3 are sub-goal rule as their conclusions are
premises of the other rules
▪ Conclusion of R1, i.e. D, is a premise of R2
▪ Conclusion of R3, i.e. B, is a premise of R1

Primitive premise
 A premise that is not a conclusion of any other rules
 E.g.
R1: (A  B)  C  D
R2: D  G  T
R3: P  Q  B
 A, C, G, P and Q are primitive premises. WHY? … Look at
the THEN part of R1, R2 and R3
▪ None of these rules has either A or C or G or P or Q as a conclusion.

Non-primitive premise
 A premise that is also a conclusion of the other rule(s)
 E.g.
R1: (A  B)  C  D
R2: D  G  T
R3: P  Q  B
 B and D are non-primitive premises. WHY? … Look at the
IF part of R1 and R3.
▪ R1 has D as a conclusion while R3 has B as a conclusion.
▪ Both B and D are premises, at the same time they also are
conclusions, thus they are non-primitive premises.

“Rule fire”
 A “rule fire” means “rule is concluded”. In other words, it
refers to a state where the conclusion of that rule is proved
as true, because its premise(s) is true”
 E.g.
R1: (A  B)  C  D
▪ If A and B are true, or if C is true, then we say “R1 fire”
with a conclusion D true.

“Rule not fire”
 Is a vice versa of “rule fire” … due to its premise(s) not true.

Backward chaining overview

An Inference strategy that attempts to prove a
hypothesis by gathering supporting information

The system works from the goal by chaining rules
together to reach a conclusion or achieve a goal

In other words, it start with the goal, and then looks for
all relevant, supporting premises that lead to achieving
the goal.
1.
2.
3.
Identify the goal.
Search for the goal rule.
If found, check its premise(s).
 If premise is primitive, check if it is in the working memory, ask user
a question if it is not there.
 If premise is non-primitive, jump to the rule where it belongs to as a
conclusion (sub-goal rule). Repeat Step 3.
4.
5.
Repeat Step 3 by jumping and firing all relevant sub-goal
rules.
Finally, fire the goal rule.
With example:
R1: (A and B) or C implies D
R2: D and G implies T ….. goal rule
1. Identify the goal …. T.
2. Identify the goal rule ….. R2.
3. Check R2’s first premise, i.e. D
▪ D is non-primitive …. it belongs to R1 as conclusion, so jump to R1.
▪ Check R1’s premises.
 A is primitive. If it is in working memory, continue checking B. If
not, ASK user a question. If the answer is ‘yes’, continue checking
B. If ‘no’, check C.
4. Either A and B are true or C is true, fire R1.
5. Jump back to R2.
6. Repeat 3 with R2’s second premise, i.e. G.
▪ G is primitive. If it is in working memory, fire R2.
Otherwise, R2 fail to fire and therefore, the goal cannot be
proven.
7. End of step.

Forward Chaining overview

An Inference strategy that begins with a set of known
facts, derives new facts using rules which premises
match the known facts, continues until goal reached or
no more rules matches.

Begins with known data and works forward to see if any
conclusions (new information) can be drawn.
1.
2.
3.
4.
Get initial data and place it in working memory.
Scan the rules searching for matched premises.
If found
 fire the rule
 add its conclusion to working memory.
Repeat Steps 2 & 3 until no more match or goal is achieved.
With example:
R1: (A and B) or C implies D
R2: D or G implies T
1. Get initial data.
2. Scan the rules in sequence.
▪ If A and B are true, or C is true, R1 fires and D is inserted into working
memory. D will cause R2 to fire when R2 is scanned. Process is then
terminated as all rules have been scanned, and no more match can be
done.
▪ If none of A, B and C true, continue scan the next rule, i.e. R2. If G is
true, R2 fires and T is inserted into working memory. Process is then
terminated as all rules have been scanned, and no more match can be
done.
What if T is in R1?
R1: (A and B) or T implies D
R2: H or G implies T
1. Get initial data.
2. Scan the rules in sequence.
▪ If none of A, B and T is true, scanning is continued with R2.
▪ If H or G is true, R2 fires and T is inserted into working memory. End
of 1st cycle with conclusion T.
▪ The 2nd cycle of scanning and firing rules begins. T is now in working
memory, therefore R1 fires. D is concluded and inserted into working
memory. End of 2nd cycle with conclusions T and D. The most recent,
i.e. D, becomes the final conclusion.

Conflict resolution
 A process to determine which rule to fire (when the
contents of the WM can cause >1 rule to fire)
 Resolution strategy:
▪ Establish the goal and stop the system when the goal is attained
▪ The order of the rules that conclude the goal is important (the engine will
fire the first one located).
▪ Assign rules with the priority values (reflect rule preferences)
▪ The system scans the rules, determines the rules to fire, and fire the ones
with highest priority.
Attribute
Backward Chaining
Forward Chaining
Also known as
Goal-driven
Data-driven
Starts from
Possible conclusion
New data
Processing
Efficient
Somewhat wasteful
Aims for
Necessary data
Any conclusion (s)
Approach
Conservative/cautious
Opportunistic
Practical if
Number of possible final
answers is reasonable or
a set of known
alternatives is available
Combinatorial explosion
creates an infinite number of
possible right answers
Appropriate for
Diagnostic application
Scheduling and monitoring
Example of
application
Selecting a specific type
of investment
Making changes to
corporate pension fund