SlideShare a Scribd company logo
Page 1===
Rule-Based Expert Systems
 Expert Systems
–One of the most successful applications of AI reasoning
technique using facts and rules
–“AI Programs that achieve expert-level competence in solving
problems by bringing to bear a body of knowledge [Feigenbaum,
McCorduck & Nii 1988]”
 Expert systems vs. knowledge-based systems
 Rule-based expert systems
–Often based on reasoning with propositional logic Horn
clauses.
Page 2===
Rule-Based Expert Systems (2)
 Structure of Expert Systems
–Knowledge Base
• Consists of predicate-calculus
facts and rules about subject at
hand.
–Inference Engine
• Consists of all the processes that
manipulate the knowledge base to
deduce information requested by
the user.
–Explanation subsystem
• Analyzes the structure of the
reasoning performed by the system
and explains it to the user.
Page 3===
Rule-Based Expert Systems (3)
 Knowledge acquisition subsystem
–Checks the growing knowledge base for possible
inconsistencies and incomplete information.
 User interface
–Consists of some kind of natural language processing system
or graphical user interfaces with menus.
 “Knowledge engineer”
–Usually a computer scientist with AI training.
–Works with an expert in the field of application in order
to represent the relevant knowledge of the expert in a
forms of that can be entered into the knowledge base.
Page 4===
Rule-Based Expert Systems (4)
OKREPBAL5.
PYMTINC4.
REPRATING3.
COLLATAPP2.
OKREPPYMTCOLLAT1.





sheet.)balanceexcellentanhasapplicant(TheBAL
expenses.)his/herexceedsincomesapplicant'(TheINC
rating.)creditgoodahasapplicant(TheRATING
amount.)loann thegrater tha
lysufficientiscollateralon theappraisal(TheAPP
.)reputationfinancialgoodahasapplicant(TheREP
payments.)loanthetoableisapplicant(ThePYMT
ry.)satisfactoisloanfor thecollateral(TheCOLLAT
approved.)beshouldloan(TheOK
Example: loan officer in a bank
“Decide whether or not to grant a personal loan to an individual.”
Facts
Rules
Page 5===
Rule-Based Expert Systems (5)
 To prove OK
– The inference engine searches fro AND/OR proof tree using either
backward or forward chaining.
 AND/OR proof tree
– Root node: OK
– Leaf node: facts
– The root and leaves will be connected through the rules.
 Using the preceding rule in a backward-chaining
– The user’s goal, to establish OK, can be done either by proving
both BAL and REP or by proving each of COLLAT, PYMT, and REP.
– Applying the other rules, as shown, results in other sets of
nodes to be proved.
Page 6===
Rule-Based Expert Systems (6)
 By backward-chaining
Page 7===
Rule-Based Expert Systems (7)
 Consulting system
–Attempt to answer a user’s query by asking questions about
the truth of propositions that they might know about.
–Backward-chaining through the rule is used to get to
askable questions.
–If a user were to “volunteer” information, bottom-up,
forward chaining through the rules could be used in an
attempt to connect to the proof tree already built.
–The ability to give explanations for a conclusion
• Very important for acceptance of expert system advice.
–Proof tree
• Used to guide the explanation-generation process.
Page 8===
Rule-Based Expert Systems (8)
 In many applications, the system has access only to
uncertain rules, and the user not be able to answer
questions with certainty.
 MYCIN [Shortliffe 1976]: Diagnose bacterial infections.
(.5).a-group-cusstreptococ;(.75)pos-coag-ccusstaphyloco
isinfectionthecausingbemightwhichsmears)orcultureson
seenan those(orther thorganismthat theevidenceisThere:Then
bacterialisinfectiontheoftypeThe4)
andculture,theofstainon theseennotwereOrganisms3)
andinfection,
esoft tissuorskinseriousofevidencehavedoespatientThe2)
and,meningitisistherapyrequireswhichinfectionThe1):If
300Rule
Page 9===
Rule-Based Expert Systems (9)
–PROSPECTOR [Duda, Gaschnig & Hart 1979, Campbell, et al.
1982]
• Reason about ore deposits
• If there is pre-intrusive, thorough –going fault system, then
there is
(5, 0.7) a regional environment favorable for porphyry copper
deposit.
–The numbers (.75 and .5 in MYCIN, and 5, 0.7 in PROSPECTOR)
are ways to represent the certainty or strength of a rule.
–The numbers are used by these systems in computing the
certainty of conclusions.
Page 10===
Rule Learning
 Inductive rule (归纳规则) learning
– Creates new rules about a domain, not derivable from any previous
rules.
– Ex) Neural networks
 Deductive rule (演绎规则)learning
– Enhances the efficiency of a system’s performance by deducting
additional rules from previously known domain rules and facts.
– Ex) EBG (explanation-based generalization)•OK –The loan should be approved
•COLLAT– The collateral for the loan is
satisfactory
•PYMT –The applicant is able to make the loan
payment
•REP – The applicant has a good financial
reputation
•APP – The appraisal on the collateral is
sufficiently greater
than the loan amount
•RATING – The applicant has a good credit
rating
Page 11===
Learning Propositional Calculus Rules
 Train rules from given training set
–Seek a set of rules that covers only positive instances
• Positive instance: OK = 1
• Negative instance: OK = 0
–From training set, we desire to induce rules of the form
–We can make some rules more specific by adding an atom to its
antecedent to make it cover fewer instances.
• Cover: If the antecedent of a rule has value True for an instance in
the training set, we say that the rule covers that instance.
–Adding a rule makes the system using these rules more general.
–Searching for a set of rules can be computationally difficult.
• here, we use “greedy” method which is called separate and
conquer.
OKn   21 }BALINC,RATING,APP,{where i
Page 12===
 Separate and conquer
–First attempt to find a single rule that covers only
positive instances
• Start with a rule that covers all instances
• Gradually make it more specific by adding atoms to its
antecedent.
–Gradually add rules until the entire set of rules covers all
and only the positive instances.
–Trained rules can be simplified using pruning.
• Operations and noise-tolerant modifications help minimize the
risk of overfitting.
Learning Propositional Calculus Rules (2)
Page 13===
 Example: loan officer in a bank
–Start with the provisional rule .
• Which cover all instances.
–Add an atom it cover fewer negative instances-working toward
covering only positive ones.
–Decide, which item should we added ?
• From by
Learning Propositional Calculus Rules (3)
OKT 
}BALINC,RATING,APP,{
 
nnr /

.antecedenttheto
ofadditionafter theruletheofantecedentthe
bycoveredinstancepositiveofnumbertotoalthe:
.antecedenttheto
ofadditionafter theruletheofantecedent
by thecoveredinstanceofnumbertotoalthe:





n
n
Page 14===
 Select that yielding the largest value of
.
Learning Propositional Calculus Rules (4)
 r
75.04/3
5.06/3
667.06/4
5.06/3




BAL
INC
RATING
APP
r
r
r
r
OKBAL
So, we select BAL, yielding the provisional rule.
Page 15===
Learning Propositional Calculus Rules (4)
 Rule covers the positive
instances 3,4, and 7, but also covers the
negative instance 1.
–So, select another atom to make this rule more specific.
 We have already decided that the first component
in the antecedent is BAL, so we have to consider
it.
OKBAL
0.12/2
0.13/3
667.03/2



INC
RATING
APP
r
r
r
OKRATINGBAL 
We select RATING because
is based on a larger sample.
RATINGr
Page 16===
Learning Propositional Calculus Rules
We need more rules which cover positive instance 6.
To learn the next rule, eliminate from the table all of
the positive instances already covered by the first rule.
Page 17===
 Begin the process all over again with reduced table
–Start with the rule .
Learning Propositional Calculus Rules (5)
OKT 
0.01/0
25.04/1
0.03/0
25.04/1




BAL
INC
RATING
APP
r
r
r
r APP=INC=0.25, arbitrarily select APP.
OKAPP
This rule covers negative instances 1, 8, and 9
 we need another atom to the antecedent.
0.01/0
5.02/1
5.02/1



BAL
INC
RATING
r
r
r Select RATING, and we get
OKRATINGAPP 
This rule covers negative example 9.
OKINCRATINGAPP –Finally we get
which covers only positive instances with first rule, so we
are finished.
Page 18===
Learning Propositional Calculus Rules (6)
 Pseudocode of this rule learning process.
–Generic Separate-and-Conquer Algorithm (GSCA)



infeaturestheoffromdrawnatomanis
antecedentitsasatoms)ofnconjunctio(the
andconsequentitsashasitrules;theofoneis
labeledbetorulesofsetais
atom,anofvalueby thelabeledeachfeatures
valued-binaryofinstancesofsettraininginitialtheis




Page 19===
Generic Separate-and-conquer
algorithm (GSCA)
1. Initialize
2. Initialize empty set of rules
3. repeat the outer loop adds rules until covers all (or most) of the
positive instances
4. Initialize
5. Initialize
6. Repeat the inner loop adds atoms to until covers only (or mainly)
positive instances
7. Select an atom to add to . This is a nondeterministic choice point
that can be used for backtracking.
8.
9. Until covers only (or mainly) positive instances in
10. We add the rule to the set of rules.
11. (the positive instances in covered by )
12. Until covers all (or most) of positive instance in
cur 
 

T 
 
 
 
   

cur
,   
cur cur    cur 
 
Page 20===
Learning First-Order Logic Rules
 Inductive logic programming (ILP)
– Concentrate on methods for inductive learning of Horn clauses in
first order predicate calculus (FOPC) and thus PROLOG program.
– FOIL [Quinlan, 1990]
 The Objective of ILP
– To learn a program, ,consisting of Horn clauses, ,each of
which is of the form where, the
are atomic formulas that unify with ground atomic facts.
• : should evaluate to True when its variables are bound to
some set of values known to be in the relation we are trying to
learn (positive instance: training set).
• : should evaluate to False when its variables are bound
to some set of values known not to be in the relation (negative
instance).
 
i ,,,: 21  i






Page 21===
 We want to cover the positives instances and not
cover negative ones.
 Background knowledge
–The ground atomic facts with which the are to unify.
–They are given-as either subsidiary PROLOG programs, which
can be run and evaluated, or explicitly in the form of a list
of facts.
 Example: A delivery robot navigating around in a
building finds through experience, that it is easy
to go between certain pairs of locations and not so
easy to go between certain other pairs.
Learning First-Order Logic Rules (2)


Page 22===
 A, B, C: junctions
 All of the other locations:
shops
 Junction(x)
–Whether junction or not.
 Shop(x,y)
–Whether shop or not which is
connected to junction x.
Learning First-Order Logic Rules (3)
Page 23===
Learning First-Order Logic Rules (4)
}CC2,,CC1,,C2C,,C1C,,BB2,,B1B,
,B2B,,B1B,,AA2,,AA1,,A2A,,A1A,
,BC,,AC,,AB,,CB,,CA,,BA,{
Ξ:EasyofinstancesPositive




}CB2,,CB1,,CA2,,CA1,,BA2,,BA1,
,BC2,,BC1,,AC2,,AC1,,AB2,,AB1,
,B2C,,B1C,,A2C,,A1C,,A2B,,A1B,
,C2B,,C1B,,C2A,,C1A,,B2A,,B1A,{
Ξ:EasyofinstancesNegative





 We want a learning program to learn a program, Easy(x,y) that
covers the positive instances in but not the negative ones.
 Easy(x,y) can use the background subexpressions Junction(x)
and Shop(x,y).
 Training set

Page 24===
–For all of the locations named in , only the following
pairs give a value True for Shop:
–The following PROLOG program covers all of the positive
instances of the training set and none of the negative ones
Easy(x, y) :- Junction(x), Junction(y)
:- Shop(x, y)
:- Shop(y, x)
Learning First-Order Logic Rules (5)

}CC2,,CC1,,BB2,,BB1,,AA2,,AA1,{ 
Page 25===
 Learning process: generalized separate and conquer
algorithm (GSCA)
–Start with a program having a single rule with no body
–Add literals to the body until the rule covers only (or
mainly) positive instances
–Add rules in the same way until the program covers all (or
most) and only (with few exceptions) positive instances.
Learning First-Order Logic Rules (6)
Page 26===
–Practical ILP systems restrict the literals in various ways.
–Typical allowed additions are
• Literals used in the background knowledge
• Literals whose arguments are a subset of those in the head of the
clause.
• Literals that introduce a new distinct variable different from those
in the head of the clause.
• A literal that equates a variable in the head of the clause with
another such variable or with a term mentioned in the background
knowledge.
• A literal that is the same (except for its arguments) as that in the
head of the clause.
Learning First-Order Logic Rules (7)
Page 27===
Learning First-Order Logic Rules (8)
 The literals that we might consider adding to a clause are
 ILP version of GSCA
– First, initialize first clause as Easy(x, y) :-
– Add Junction(x), so Easy(x, y) :- Junction(x) covers the following
instances
– Include more literal ‘Junction(y)’  Easy(x, y) :- Junction(x),
Junction(y)
Junction(x), Junction(y), Junction(z)
Shop(x,y), Shop(y,x), Shop(x,z)
Shop(z,y), (x=y)
}C2C,,C1C,,B2B,,B1B,,A2A,,A1A,
,BC,,AC,,AB,,CB,,CA,,BA,{


}C2B,,C1B,,A2B,,A1B,,B2C,,B1C,
,A2C,,A1C,,C2A,,C1A,,B2A,,B1A,{


Positive instances
Negative instances
}BC,,AC,,AB,,CB,,CA,,BA,{ 
Page 28===
–But program does not cover the following positive instances.
–Remove the positive instance covered by Easy(x,y):-Junction(x),
Junction(y) from to form the to be used in next
pass through inner loop.
• : all negative instance in + the positive instance that
are not covered yet.
–Inner loop create another initial clause “Easy(x,y) :-”
• Add literal Shop(x,y) : Easy(x,y) :- Shop(x,y)  cover no negative
instances, so we are finished with another pass through inner loop.
• Covered positive instance by this rule ( remove this from )
Learning First-Order Logic Rules (9)

}CC2,,CC1,,C2C,,C1C,,BB2,,BB1,
,B2B,,B1B,,AA2,,AA1,,A2A,,A1A,{


 CUR
CUR
}CC2,,CC1,,BB2,,BB1,,AA2,,AA1,{ 
CUR
Page 29===
–Now we have Easy(x,y) :- Junction(x), Junction(y)
:- Shop(x, y)
–To cover following instance
–Add Shop(y, x)
–Then we have Easy(x,y) :- Junction(x), Junction(y)
:- Shop(x, y)
:- Shop(y, x)
–This cover only positive instances.
Learning First-Order Logic Rules (10)
}C2C,,C1C,,B2B,,B1B,,A2A,,A1A,{ 
Page 30===
Explanation-Based Generalization (1)
 Example: “Block world”
–General knowledge of the “Block world”.
• Rules
• Fact
• We want to proof
“ ”
• Proof is very simple 
Page 31===
Explanation-Based Generalization (2)
 Explanation: Set of facts used in the proof
–Ex) explanation for “ ” is “
”
–From this explanation, we can make “
”
• Replacing constant ‘A’ by variable ‘x’, then, we have “Green(x)”
• Then we can proof “ ”, as like the case of “
”
• Explanation Based Generalization
 Explanation-based generalization (EBG): Generalizing the
explanation by replacing constant by variable
–More rules might slow down the reasoning process, so EBG must be
used with care-possibly by keeping information about the utility
of the learned rules.

More Related Content

What's hot

Wireless application protocol
Wireless application protocolWireless application protocol
Wireless application protocol
SrideviHV
 
Jaimin chp-3 - data-link layer- 2011 batch
Jaimin   chp-3 - data-link layer- 2011 batchJaimin   chp-3 - data-link layer- 2011 batch
Jaimin chp-3 - data-link layer- 2011 batch
Jaimin Jani
 
Clock Synchronization (Distributed computing)
Clock Synchronization (Distributed computing)Clock Synchronization (Distributed computing)
Clock Synchronization (Distributed computing)Sri Prasanna
 
Concurrency control!
Concurrency control!Concurrency control!
Concurrency control!
Ashish K
 
The Application Layer
The Application LayerThe Application Layer
The Application Layer
adil raja
 
Congestion on computer network
Congestion on computer networkCongestion on computer network
Congestion on computer networkDisi Dc
 
Chapter 6 intermediate code generation
Chapter 6   intermediate code generationChapter 6   intermediate code generation
Chapter 6 intermediate code generation
Vipul Naik
 
Admission control
Admission controlAdmission control
Admission control
Vishal Waghmare
 
basics of compiler design
basics of compiler designbasics of compiler design
basics of compiler design
Preeti Katiyar
 
Transport layer protocols : TCP and UDP
Transport layer protocols  : TCP and UDPTransport layer protocols  : TCP and UDP
Transport layer protocols : TCP and UDP
Kongu Engineering College, Perundurai, Erode
 
Compiler construction tools
Compiler construction toolsCompiler construction tools
Compiler construction tools
Akhil Kaushik
 
Pipelining & All Hazards Solution
Pipelining  & All Hazards SolutionPipelining  & All Hazards Solution
Pipelining & All Hazards Solution
.AIR UNIVERSITY ISLAMABAD
 
Rule based system
Rule based systemRule based system
Rule based system
Dr. C.V. Suresh Babu
 
Protocolos arp, rarp y técnicas de multidifucion
Protocolos arp, rarp y técnicas de multidifucionProtocolos arp, rarp y técnicas de multidifucion
Protocolos arp, rarp y técnicas de multidifucion
Ricardo Sava
 
Real-Time Operating Systems
Real-Time Operating SystemsReal-Time Operating Systems
Real-Time Operating Systems
Praveen Penumathsa
 
Connecting devices
Connecting devicesConnecting devices
Connecting devices
Himanshu Shekhar
 
Computer Networks Unit 1 Introduction and Physical Layer
Computer Networks Unit 1 Introduction and Physical Layer Computer Networks Unit 1 Introduction and Physical Layer
Computer Networks Unit 1 Introduction and Physical Layer
Dr. SELVAGANESAN S
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed system
Sunita Sahu
 
ATM Networking Concept
ATM Networking ConceptATM Networking Concept
ATM Networking Concept
Tushar Ranjan
 
Lecture 02 lexical analysis
Lecture 02 lexical analysisLecture 02 lexical analysis
Lecture 02 lexical analysis
Iffat Anjum
 

What's hot (20)

Wireless application protocol
Wireless application protocolWireless application protocol
Wireless application protocol
 
Jaimin chp-3 - data-link layer- 2011 batch
Jaimin   chp-3 - data-link layer- 2011 batchJaimin   chp-3 - data-link layer- 2011 batch
Jaimin chp-3 - data-link layer- 2011 batch
 
Clock Synchronization (Distributed computing)
Clock Synchronization (Distributed computing)Clock Synchronization (Distributed computing)
Clock Synchronization (Distributed computing)
 
Concurrency control!
Concurrency control!Concurrency control!
Concurrency control!
 
The Application Layer
The Application LayerThe Application Layer
The Application Layer
 
Congestion on computer network
Congestion on computer networkCongestion on computer network
Congestion on computer network
 
Chapter 6 intermediate code generation
Chapter 6   intermediate code generationChapter 6   intermediate code generation
Chapter 6 intermediate code generation
 
Admission control
Admission controlAdmission control
Admission control
 
basics of compiler design
basics of compiler designbasics of compiler design
basics of compiler design
 
Transport layer protocols : TCP and UDP
Transport layer protocols  : TCP and UDPTransport layer protocols  : TCP and UDP
Transport layer protocols : TCP and UDP
 
Compiler construction tools
Compiler construction toolsCompiler construction tools
Compiler construction tools
 
Pipelining & All Hazards Solution
Pipelining  & All Hazards SolutionPipelining  & All Hazards Solution
Pipelining & All Hazards Solution
 
Rule based system
Rule based systemRule based system
Rule based system
 
Protocolos arp, rarp y técnicas de multidifucion
Protocolos arp, rarp y técnicas de multidifucionProtocolos arp, rarp y técnicas de multidifucion
Protocolos arp, rarp y técnicas de multidifucion
 
Real-Time Operating Systems
Real-Time Operating SystemsReal-Time Operating Systems
Real-Time Operating Systems
 
Connecting devices
Connecting devicesConnecting devices
Connecting devices
 
Computer Networks Unit 1 Introduction and Physical Layer
Computer Networks Unit 1 Introduction and Physical Layer Computer Networks Unit 1 Introduction and Physical Layer
Computer Networks Unit 1 Introduction and Physical Layer
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed system
 
ATM Networking Concept
ATM Networking ConceptATM Networking Concept
ATM Networking Concept
 
Lecture 02 lexical analysis
Lecture 02 lexical analysisLecture 02 lexical analysis
Lecture 02 lexical analysis
 

Viewers also liked

Lecture 4 Meta Knowledge
Lecture 4 Meta KnowledgeLecture 4 Meta Knowledge
Lecture 4 Meta KnowledgeSimon Shurville
 
04 reasoning systems
04 reasoning systems04 reasoning systems
04 reasoning systemsJohn Issac
 
Baye’s Theorem
Baye’s TheoremBaye’s Theorem
Baye’s Theorem
Daniel Ross
 
Bayes theorem explained
Bayes theorem explainedBayes theorem explained
Bayes theorem explainedDaniel Ross
 
Probability Concept and Bayes Theorem
Probability Concept and Bayes TheoremProbability Concept and Bayes Theorem
Probability Concept and Bayes TheoremCherryBerry2
 
Probability basics and bayes' theorem
Probability basics and bayes' theoremProbability basics and bayes' theorem
Probability basics and bayes' theorem
Balaji P
 
Bayes Theorem
Bayes TheoremBayes Theorem
PROBABILITY
PROBABILITYPROBABILITY
PROBABILITY
VIV13
 

Viewers also liked (10)

Rule Based System
Rule Based SystemRule Based System
Rule Based System
 
Lecture 4 Meta Knowledge
Lecture 4 Meta KnowledgeLecture 4 Meta Knowledge
Lecture 4 Meta Knowledge
 
04 reasoning systems
04 reasoning systems04 reasoning systems
04 reasoning systems
 
Baye’s Theorem
Baye’s TheoremBaye’s Theorem
Baye’s Theorem
 
Bayes theorem explained
Bayes theorem explainedBayes theorem explained
Bayes theorem explained
 
Probability Concept and Bayes Theorem
Probability Concept and Bayes TheoremProbability Concept and Bayes Theorem
Probability Concept and Bayes Theorem
 
Probability basics and bayes' theorem
Probability basics and bayes' theoremProbability basics and bayes' theorem
Probability basics and bayes' theorem
 
Bayes Theorem
Bayes TheoremBayes Theorem
Bayes Theorem
 
Bayes Theorem
Bayes TheoremBayes Theorem
Bayes Theorem
 
PROBABILITY
PROBABILITYPROBABILITY
PROBABILITY
 

Similar to 17 2 expert systems

Production System1.pdf
Production System1.pdfProduction System1.pdf
Production System1.pdf
sajidawazeer8
 
Lecture 6 expert systems
Lecture 6   expert systemsLecture 6   expert systems
Lecture 6 expert systems
Vajira Thambawita
 
New_ML_Lecture_9.ppt
New_ML_Lecture_9.pptNew_ML_Lecture_9.ppt
New_ML_Lecture_9.ppt
EmmaMaria6
 
Finalpresentation 120711124135-phpapp02
Finalpresentation 120711124135-phpapp02Finalpresentation 120711124135-phpapp02
Finalpresentation 120711124135-phpapp02Bhargava Dutt
 
Clustering and Classification Algorithms Ankita Dubey
Clustering and Classification Algorithms Ankita DubeyClustering and Classification Algorithms Ankita Dubey
Clustering and Classification Algorithms Ankita Dubey
Ankita Dubey
 
Parallel Rule Generation For Efficient Classification System
Parallel Rule Generation For Efficient Classification SystemParallel Rule Generation For Efficient Classification System
Parallel Rule Generation For Efficient Classification System
Talha Ghaffar
 
Rules Programming tutorial
Rules Programming tutorialRules Programming tutorial
Rules Programming tutorialSrinath Perera
 
FORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCE
FORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCEFORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCE
FORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCE
JohnLeonard Onwuzuruigbo
 
Production System
Production SystemProduction System
Production System
Varunjeet Singh Rekhi
 
NITW_Improving Deep Neural Networks.pptx
NITW_Improving Deep Neural Networks.pptxNITW_Improving Deep Neural Networks.pptx
NITW_Improving Deep Neural Networks.pptx
ssuserd23711
 
NITW_Improving Deep Neural Networks (1).pptx
NITW_Improving Deep Neural Networks (1).pptxNITW_Improving Deep Neural Networks (1).pptx
NITW_Improving Deep Neural Networks (1).pptx
DrKBManwade
 
Unit 1 Fundamentals of Artificial Intelligence-Part II.pptx
Unit 1  Fundamentals of Artificial Intelligence-Part II.pptxUnit 1  Fundamentals of Artificial Intelligence-Part II.pptx
Unit 1 Fundamentals of Artificial Intelligence-Part II.pptx
DrYogeshDeshmukh1
 
bankers-algorithm2.pptx
bankers-algorithm2.pptxbankers-algorithm2.pptx
bankers-algorithm2.pptx
jamilmalik19
 
Ali Mousavi -- Event modeling
Ali Mousavi -- Event modeling Ali Mousavi -- Event modeling
Ali Mousavi -- Event modeling
Anatoly Levenchuk
 
NEXT- A System for Real-World Development, Evaluation, and Application of Act...
NEXT- A System for Real-World Development, Evaluation, and Application of Act...NEXT- A System for Real-World Development, Evaluation, and Application of Act...
NEXT- A System for Real-World Development, Evaluation, and Application of Act...Nicholas Glattard
 
Droolsand Rule Based Systems 2008 Srping
Droolsand Rule Based Systems 2008 SrpingDroolsand Rule Based Systems 2008 Srping
Droolsand Rule Based Systems 2008 Srping
Srinath Perera
 

Similar to 17 2 expert systems (20)

Production System1.pdf
Production System1.pdfProduction System1.pdf
Production System1.pdf
 
Lecture 6 expert systems
Lecture 6   expert systemsLecture 6   expert systems
Lecture 6 expert systems
 
.doc
.doc.doc
.doc
 
.doc
.doc.doc
.doc
 
New_ML_Lecture_9.ppt
New_ML_Lecture_9.pptNew_ML_Lecture_9.ppt
New_ML_Lecture_9.ppt
 
expert systems
expert systemsexpert systems
expert systems
 
Finalpresentation 120711124135-phpapp02
Finalpresentation 120711124135-phpapp02Finalpresentation 120711124135-phpapp02
Finalpresentation 120711124135-phpapp02
 
Clustering and Classification Algorithms Ankita Dubey
Clustering and Classification Algorithms Ankita DubeyClustering and Classification Algorithms Ankita Dubey
Clustering and Classification Algorithms Ankita Dubey
 
Parallel Rule Generation For Efficient Classification System
Parallel Rule Generation For Efficient Classification SystemParallel Rule Generation For Efficient Classification System
Parallel Rule Generation For Efficient Classification System
 
Rules Programming tutorial
Rules Programming tutorialRules Programming tutorial
Rules Programming tutorial
 
FORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCE
FORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCEFORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCE
FORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCE
 
Production System
Production SystemProduction System
Production System
 
NITW_Improving Deep Neural Networks.pptx
NITW_Improving Deep Neural Networks.pptxNITW_Improving Deep Neural Networks.pptx
NITW_Improving Deep Neural Networks.pptx
 
NITW_Improving Deep Neural Networks (1).pptx
NITW_Improving Deep Neural Networks (1).pptxNITW_Improving Deep Neural Networks (1).pptx
NITW_Improving Deep Neural Networks (1).pptx
 
Unit 1 Fundamentals of Artificial Intelligence-Part II.pptx
Unit 1  Fundamentals of Artificial Intelligence-Part II.pptxUnit 1  Fundamentals of Artificial Intelligence-Part II.pptx
Unit 1 Fundamentals of Artificial Intelligence-Part II.pptx
 
bankers-algorithm2.pptx
bankers-algorithm2.pptxbankers-algorithm2.pptx
bankers-algorithm2.pptx
 
Ali Mousavi -- Event modeling
Ali Mousavi -- Event modeling Ali Mousavi -- Event modeling
Ali Mousavi -- Event modeling
 
Test design
Test designTest design
Test design
 
NEXT- A System for Real-World Development, Evaluation, and Application of Act...
NEXT- A System for Real-World Development, Evaluation, and Application of Act...NEXT- A System for Real-World Development, Evaluation, and Application of Act...
NEXT- A System for Real-World Development, Evaluation, and Application of Act...
 
Droolsand Rule Based Systems 2008 Srping
Droolsand Rule Based Systems 2008 SrpingDroolsand Rule Based Systems 2008 Srping
Droolsand Rule Based Systems 2008 Srping
 

More from Tianlu Wang

14 pro resolution
14 pro resolution14 pro resolution
14 pro resolution
Tianlu Wang
 
13 propositional calculus
13 propositional calculus13 propositional calculus
13 propositional calculus
Tianlu Wang
 
12 adversal search
12 adversal search12 adversal search
12 adversal search
Tianlu Wang
 
11 alternative search
11 alternative search11 alternative search
11 alternative search
Tianlu Wang
 
21 situation calculus
21 situation calculus21 situation calculus
21 situation calculus
Tianlu Wang
 
20 bayes learning
20 bayes learning20 bayes learning
20 bayes learning
Tianlu Wang
 
19 uncertain evidence
19 uncertain evidence19 uncertain evidence
19 uncertain evidence
Tianlu Wang
 
18 common knowledge
18 common knowledge18 common knowledge
18 common knowledge
Tianlu Wang
 
17 1 knowledge-based system
17 1 knowledge-based system17 1 knowledge-based system
17 1 knowledge-based system
Tianlu Wang
 
16 2 predicate resolution
16 2 predicate resolution16 2 predicate resolution
16 2 predicate resolution
Tianlu Wang
 
16 1 predicate resolution
16 1 predicate resolution16 1 predicate resolution
16 1 predicate resolution
Tianlu Wang
 
09 heuristic search
09 heuristic search09 heuristic search
09 heuristic search
Tianlu Wang
 
08 uninformed search
08 uninformed search08 uninformed search
08 uninformed search
Tianlu Wang
 
07 plan agent
07 plan agent07 plan agent
07 plan agent
Tianlu Wang
 

More from Tianlu Wang (20)

L7 er2
L7 er2L7 er2
L7 er2
 
L8 design1
L8 design1L8 design1
L8 design1
 
L9 design2
L9 design2L9 design2
L9 design2
 
14 pro resolution
14 pro resolution14 pro resolution
14 pro resolution
 
13 propositional calculus
13 propositional calculus13 propositional calculus
13 propositional calculus
 
12 adversal search
12 adversal search12 adversal search
12 adversal search
 
11 alternative search
11 alternative search11 alternative search
11 alternative search
 
10 2 sum
10 2 sum10 2 sum
10 2 sum
 
22 planning
22 planning22 planning
22 planning
 
21 situation calculus
21 situation calculus21 situation calculus
21 situation calculus
 
20 bayes learning
20 bayes learning20 bayes learning
20 bayes learning
 
19 uncertain evidence
19 uncertain evidence19 uncertain evidence
19 uncertain evidence
 
18 common knowledge
18 common knowledge18 common knowledge
18 common knowledge
 
17 1 knowledge-based system
17 1 knowledge-based system17 1 knowledge-based system
17 1 knowledge-based system
 
16 2 predicate resolution
16 2 predicate resolution16 2 predicate resolution
16 2 predicate resolution
 
16 1 predicate resolution
16 1 predicate resolution16 1 predicate resolution
16 1 predicate resolution
 
15 predicate
15 predicate15 predicate
15 predicate
 
09 heuristic search
09 heuristic search09 heuristic search
09 heuristic search
 
08 uninformed search
08 uninformed search08 uninformed search
08 uninformed search
 
07 plan agent
07 plan agent07 plan agent
07 plan agent
 

Recently uploaded

一比一原版UPenn毕业证宾夕法尼亚大学毕业证成绩单如何办理
一比一原版UPenn毕业证宾夕法尼亚大学毕业证成绩单如何办理一比一原版UPenn毕业证宾夕法尼亚大学毕业证成绩单如何办理
一比一原版UPenn毕业证宾夕法尼亚大学毕业证成绩单如何办理
beduwt
 
2137ad - Characters that live in Merindol and are at the center of main stories
2137ad - Characters that live in Merindol and are at the center of main stories2137ad - Characters that live in Merindol and are at the center of main stories
2137ad - Characters that live in Merindol and are at the center of main stories
luforfor
 
2137ad Merindol Colony Interiors where refugee try to build a seemengly norm...
2137ad  Merindol Colony Interiors where refugee try to build a seemengly norm...2137ad  Merindol Colony Interiors where refugee try to build a seemengly norm...
2137ad Merindol Colony Interiors where refugee try to build a seemengly norm...
luforfor
 
ART FORMS OF KERALA: TRADITIONAL AND OTHERS
ART FORMS OF KERALA: TRADITIONAL AND OTHERSART FORMS OF KERALA: TRADITIONAL AND OTHERS
ART FORMS OF KERALA: TRADITIONAL AND OTHERS
Sandhya J.Nair
 
一比一原版(DU毕业证)迪肯大学毕业证成绩单
一比一原版(DU毕业证)迪肯大学毕业证成绩单一比一原版(DU毕业证)迪肯大学毕业证成绩单
一比一原版(DU毕业证)迪肯大学毕业证成绩单
zvaywau
 
IrishWritersCtrsPersonalEssaysMay29.pptx
IrishWritersCtrsPersonalEssaysMay29.pptxIrishWritersCtrsPersonalEssaysMay29.pptx
IrishWritersCtrsPersonalEssaysMay29.pptx
Aine Greaney Ellrott
 
acting board rough title here lolaaaaaaa
acting board rough title here lolaaaaaaaacting board rough title here lolaaaaaaa
acting board rough title here lolaaaaaaa
angelicafronda7
 
Sundabet | Slot gacor dan terpercaya mudah menang
Sundabet | Slot gacor dan terpercaya mudah menangSundabet | Slot gacor dan terpercaya mudah menang
Sundabet | Slot gacor dan terpercaya mudah menang
Sundabet | Situs Slot gacor dan terpercaya
 
The Legacy of Breton In A New Age by Master Terrance Lindall
The Legacy of Breton In A New Age by Master Terrance LindallThe Legacy of Breton In A New Age by Master Terrance Lindall
The Legacy of Breton In A New Age by Master Terrance Lindall
BBaez1
 
一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理
一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理
一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理
taqyed
 
一比一原版(GU毕业证)格里菲斯大学毕业证成绩单
一比一原版(GU毕业证)格里菲斯大学毕业证成绩单一比一原版(GU毕业证)格里菲斯大学毕业证成绩单
一比一原版(GU毕业证)格里菲斯大学毕业证成绩单
zvaywau
 
Caffeinated Pitch Bible- developed by Claire Wilson
Caffeinated Pitch Bible- developed by Claire WilsonCaffeinated Pitch Bible- developed by Claire Wilson
Caffeinated Pitch Bible- developed by Claire Wilson
ClaireWilson398082
 
Codes n Conventionss copy (2).pptx new new
Codes n Conventionss copy (2).pptx new newCodes n Conventionss copy (2).pptx new new
Codes n Conventionss copy (2).pptx new new
ZackSpencer3
 
The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎
The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎
The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎
iraqartsandculture
 
Memory Rental Store - The Ending(Storyboard)
Memory Rental Store - The Ending(Storyboard)Memory Rental Store - The Ending(Storyboard)
Memory Rental Store - The Ending(Storyboard)
SuryaKalyan3
 
Memory Rental Store - The Chase (Storyboard)
Memory Rental Store - The Chase (Storyboard)Memory Rental Store - The Chase (Storyboard)
Memory Rental Store - The Chase (Storyboard)
SuryaKalyan3
 
CLASS XII- HISTORY-THEME 4-Thinkers, Bes
CLASS XII- HISTORY-THEME 4-Thinkers, BesCLASS XII- HISTORY-THEME 4-Thinkers, Bes
CLASS XII- HISTORY-THEME 4-Thinkers, Bes
aditiyad2020
 
thGAP - BAbyss in Moderno!! Transgenic Human Germline Alternatives Project
thGAP - BAbyss in Moderno!!  Transgenic Human Germline Alternatives ProjectthGAP - BAbyss in Moderno!!  Transgenic Human Germline Alternatives Project
thGAP - BAbyss in Moderno!! Transgenic Human Germline Alternatives Project
Marc Dusseiller Dusjagr
 
Inter-Dimensional Girl Boards Segment (Act 3)
Inter-Dimensional Girl Boards Segment (Act 3)Inter-Dimensional Girl Boards Segment (Act 3)
Inter-Dimensional Girl Boards Segment (Act 3)
CristianMestre
 

Recently uploaded (20)

European Cybersecurity Skills Framework Role Profiles.pdf
European Cybersecurity Skills Framework Role Profiles.pdfEuropean Cybersecurity Skills Framework Role Profiles.pdf
European Cybersecurity Skills Framework Role Profiles.pdf
 
一比一原版UPenn毕业证宾夕法尼亚大学毕业证成绩单如何办理
一比一原版UPenn毕业证宾夕法尼亚大学毕业证成绩单如何办理一比一原版UPenn毕业证宾夕法尼亚大学毕业证成绩单如何办理
一比一原版UPenn毕业证宾夕法尼亚大学毕业证成绩单如何办理
 
2137ad - Characters that live in Merindol and are at the center of main stories
2137ad - Characters that live in Merindol and are at the center of main stories2137ad - Characters that live in Merindol and are at the center of main stories
2137ad - Characters that live in Merindol and are at the center of main stories
 
2137ad Merindol Colony Interiors where refugee try to build a seemengly norm...
2137ad  Merindol Colony Interiors where refugee try to build a seemengly norm...2137ad  Merindol Colony Interiors where refugee try to build a seemengly norm...
2137ad Merindol Colony Interiors where refugee try to build a seemengly norm...
 
ART FORMS OF KERALA: TRADITIONAL AND OTHERS
ART FORMS OF KERALA: TRADITIONAL AND OTHERSART FORMS OF KERALA: TRADITIONAL AND OTHERS
ART FORMS OF KERALA: TRADITIONAL AND OTHERS
 
一比一原版(DU毕业证)迪肯大学毕业证成绩单
一比一原版(DU毕业证)迪肯大学毕业证成绩单一比一原版(DU毕业证)迪肯大学毕业证成绩单
一比一原版(DU毕业证)迪肯大学毕业证成绩单
 
IrishWritersCtrsPersonalEssaysMay29.pptx
IrishWritersCtrsPersonalEssaysMay29.pptxIrishWritersCtrsPersonalEssaysMay29.pptx
IrishWritersCtrsPersonalEssaysMay29.pptx
 
acting board rough title here lolaaaaaaa
acting board rough title here lolaaaaaaaacting board rough title here lolaaaaaaa
acting board rough title here lolaaaaaaa
 
Sundabet | Slot gacor dan terpercaya mudah menang
Sundabet | Slot gacor dan terpercaya mudah menangSundabet | Slot gacor dan terpercaya mudah menang
Sundabet | Slot gacor dan terpercaya mudah menang
 
The Legacy of Breton In A New Age by Master Terrance Lindall
The Legacy of Breton In A New Age by Master Terrance LindallThe Legacy of Breton In A New Age by Master Terrance Lindall
The Legacy of Breton In A New Age by Master Terrance Lindall
 
一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理
一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理
一比一原版(qut毕业证)昆士兰科技大学毕业证如何办理
 
一比一原版(GU毕业证)格里菲斯大学毕业证成绩单
一比一原版(GU毕业证)格里菲斯大学毕业证成绩单一比一原版(GU毕业证)格里菲斯大学毕业证成绩单
一比一原版(GU毕业证)格里菲斯大学毕业证成绩单
 
Caffeinated Pitch Bible- developed by Claire Wilson
Caffeinated Pitch Bible- developed by Claire WilsonCaffeinated Pitch Bible- developed by Claire Wilson
Caffeinated Pitch Bible- developed by Claire Wilson
 
Codes n Conventionss copy (2).pptx new new
Codes n Conventionss copy (2).pptx new newCodes n Conventionss copy (2).pptx new new
Codes n Conventionss copy (2).pptx new new
 
The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎
The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎
The Last Polymath: Muntadher Saleh‎‎‎‎‎‎‎‎‎‎‎‎
 
Memory Rental Store - The Ending(Storyboard)
Memory Rental Store - The Ending(Storyboard)Memory Rental Store - The Ending(Storyboard)
Memory Rental Store - The Ending(Storyboard)
 
Memory Rental Store - The Chase (Storyboard)
Memory Rental Store - The Chase (Storyboard)Memory Rental Store - The Chase (Storyboard)
Memory Rental Store - The Chase (Storyboard)
 
CLASS XII- HISTORY-THEME 4-Thinkers, Bes
CLASS XII- HISTORY-THEME 4-Thinkers, BesCLASS XII- HISTORY-THEME 4-Thinkers, Bes
CLASS XII- HISTORY-THEME 4-Thinkers, Bes
 
thGAP - BAbyss in Moderno!! Transgenic Human Germline Alternatives Project
thGAP - BAbyss in Moderno!!  Transgenic Human Germline Alternatives ProjectthGAP - BAbyss in Moderno!!  Transgenic Human Germline Alternatives Project
thGAP - BAbyss in Moderno!! Transgenic Human Germline Alternatives Project
 
Inter-Dimensional Girl Boards Segment (Act 3)
Inter-Dimensional Girl Boards Segment (Act 3)Inter-Dimensional Girl Boards Segment (Act 3)
Inter-Dimensional Girl Boards Segment (Act 3)
 

17 2 expert systems

  • 1. Page 1=== Rule-Based Expert Systems  Expert Systems –One of the most successful applications of AI reasoning technique using facts and rules –“AI Programs that achieve expert-level competence in solving problems by bringing to bear a body of knowledge [Feigenbaum, McCorduck & Nii 1988]”  Expert systems vs. knowledge-based systems  Rule-based expert systems –Often based on reasoning with propositional logic Horn clauses.
  • 2. Page 2=== Rule-Based Expert Systems (2)  Structure of Expert Systems –Knowledge Base • Consists of predicate-calculus facts and rules about subject at hand. –Inference Engine • Consists of all the processes that manipulate the knowledge base to deduce information requested by the user. –Explanation subsystem • Analyzes the structure of the reasoning performed by the system and explains it to the user.
  • 3. Page 3=== Rule-Based Expert Systems (3)  Knowledge acquisition subsystem –Checks the growing knowledge base for possible inconsistencies and incomplete information.  User interface –Consists of some kind of natural language processing system or graphical user interfaces with menus.  “Knowledge engineer” –Usually a computer scientist with AI training. –Works with an expert in the field of application in order to represent the relevant knowledge of the expert in a forms of that can be entered into the knowledge base.
  • 4. Page 4=== Rule-Based Expert Systems (4) OKREPBAL5. PYMTINC4. REPRATING3. COLLATAPP2. OKREPPYMTCOLLAT1.      sheet.)balanceexcellentanhasapplicant(TheBAL expenses.)his/herexceedsincomesapplicant'(TheINC rating.)creditgoodahasapplicant(TheRATING amount.)loann thegrater tha lysufficientiscollateralon theappraisal(TheAPP .)reputationfinancialgoodahasapplicant(TheREP payments.)loanthetoableisapplicant(ThePYMT ry.)satisfactoisloanfor thecollateral(TheCOLLAT approved.)beshouldloan(TheOK Example: loan officer in a bank “Decide whether or not to grant a personal loan to an individual.” Facts Rules
  • 5. Page 5=== Rule-Based Expert Systems (5)  To prove OK – The inference engine searches fro AND/OR proof tree using either backward or forward chaining.  AND/OR proof tree – Root node: OK – Leaf node: facts – The root and leaves will be connected through the rules.  Using the preceding rule in a backward-chaining – The user’s goal, to establish OK, can be done either by proving both BAL and REP or by proving each of COLLAT, PYMT, and REP. – Applying the other rules, as shown, results in other sets of nodes to be proved.
  • 6. Page 6=== Rule-Based Expert Systems (6)  By backward-chaining
  • 7. Page 7=== Rule-Based Expert Systems (7)  Consulting system –Attempt to answer a user’s query by asking questions about the truth of propositions that they might know about. –Backward-chaining through the rule is used to get to askable questions. –If a user were to “volunteer” information, bottom-up, forward chaining through the rules could be used in an attempt to connect to the proof tree already built. –The ability to give explanations for a conclusion • Very important for acceptance of expert system advice. –Proof tree • Used to guide the explanation-generation process.
  • 8. Page 8=== Rule-Based Expert Systems (8)  In many applications, the system has access only to uncertain rules, and the user not be able to answer questions with certainty.  MYCIN [Shortliffe 1976]: Diagnose bacterial infections. (.5).a-group-cusstreptococ;(.75)pos-coag-ccusstaphyloco isinfectionthecausingbemightwhichsmears)orcultureson seenan those(orther thorganismthat theevidenceisThere:Then bacterialisinfectiontheoftypeThe4) andculture,theofstainon theseennotwereOrganisms3) andinfection, esoft tissuorskinseriousofevidencehavedoespatientThe2) and,meningitisistherapyrequireswhichinfectionThe1):If 300Rule
  • 9. Page 9=== Rule-Based Expert Systems (9) –PROSPECTOR [Duda, Gaschnig & Hart 1979, Campbell, et al. 1982] • Reason about ore deposits • If there is pre-intrusive, thorough –going fault system, then there is (5, 0.7) a regional environment favorable for porphyry copper deposit. –The numbers (.75 and .5 in MYCIN, and 5, 0.7 in PROSPECTOR) are ways to represent the certainty or strength of a rule. –The numbers are used by these systems in computing the certainty of conclusions.
  • 10. Page 10=== Rule Learning  Inductive rule (归纳规则) learning – Creates new rules about a domain, not derivable from any previous rules. – Ex) Neural networks  Deductive rule (演绎规则)learning – Enhances the efficiency of a system’s performance by deducting additional rules from previously known domain rules and facts. – Ex) EBG (explanation-based generalization)•OK –The loan should be approved •COLLAT– The collateral for the loan is satisfactory •PYMT –The applicant is able to make the loan payment •REP – The applicant has a good financial reputation •APP – The appraisal on the collateral is sufficiently greater than the loan amount •RATING – The applicant has a good credit rating
  • 11. Page 11=== Learning Propositional Calculus Rules  Train rules from given training set –Seek a set of rules that covers only positive instances • Positive instance: OK = 1 • Negative instance: OK = 0 –From training set, we desire to induce rules of the form –We can make some rules more specific by adding an atom to its antecedent to make it cover fewer instances. • Cover: If the antecedent of a rule has value True for an instance in the training set, we say that the rule covers that instance. –Adding a rule makes the system using these rules more general. –Searching for a set of rules can be computationally difficult. • here, we use “greedy” method which is called separate and conquer. OKn   21 }BALINC,RATING,APP,{where i
  • 12. Page 12===  Separate and conquer –First attempt to find a single rule that covers only positive instances • Start with a rule that covers all instances • Gradually make it more specific by adding atoms to its antecedent. –Gradually add rules until the entire set of rules covers all and only the positive instances. –Trained rules can be simplified using pruning. • Operations and noise-tolerant modifications help minimize the risk of overfitting. Learning Propositional Calculus Rules (2)
  • 13. Page 13===  Example: loan officer in a bank –Start with the provisional rule . • Which cover all instances. –Add an atom it cover fewer negative instances-working toward covering only positive ones. –Decide, which item should we added ? • From by Learning Propositional Calculus Rules (3) OKT  }BALINC,RATING,APP,{   nnr /  .antecedenttheto ofadditionafter theruletheofantecedentthe bycoveredinstancepositiveofnumbertotoalthe: .antecedenttheto ofadditionafter theruletheofantecedent by thecoveredinstanceofnumbertotoalthe:      n n
  • 14. Page 14===  Select that yielding the largest value of . Learning Propositional Calculus Rules (4)  r 75.04/3 5.06/3 667.06/4 5.06/3     BAL INC RATING APP r r r r OKBAL So, we select BAL, yielding the provisional rule.
  • 15. Page 15=== Learning Propositional Calculus Rules (4)  Rule covers the positive instances 3,4, and 7, but also covers the negative instance 1. –So, select another atom to make this rule more specific.  We have already decided that the first component in the antecedent is BAL, so we have to consider it. OKBAL 0.12/2 0.13/3 667.03/2    INC RATING APP r r r OKRATINGBAL  We select RATING because is based on a larger sample. RATINGr
  • 16. Page 16=== Learning Propositional Calculus Rules We need more rules which cover positive instance 6. To learn the next rule, eliminate from the table all of the positive instances already covered by the first rule.
  • 17. Page 17===  Begin the process all over again with reduced table –Start with the rule . Learning Propositional Calculus Rules (5) OKT  0.01/0 25.04/1 0.03/0 25.04/1     BAL INC RATING APP r r r r APP=INC=0.25, arbitrarily select APP. OKAPP This rule covers negative instances 1, 8, and 9  we need another atom to the antecedent. 0.01/0 5.02/1 5.02/1    BAL INC RATING r r r Select RATING, and we get OKRATINGAPP  This rule covers negative example 9. OKINCRATINGAPP –Finally we get which covers only positive instances with first rule, so we are finished.
  • 18. Page 18=== Learning Propositional Calculus Rules (6)  Pseudocode of this rule learning process. –Generic Separate-and-Conquer Algorithm (GSCA)    infeaturestheoffromdrawnatomanis antecedentitsasatoms)ofnconjunctio(the andconsequentitsashasitrules;theofoneis labeledbetorulesofsetais atom,anofvalueby thelabeledeachfeatures valued-binaryofinstancesofsettraininginitialtheis    
  • 19. Page 19=== Generic Separate-and-conquer algorithm (GSCA) 1. Initialize 2. Initialize empty set of rules 3. repeat the outer loop adds rules until covers all (or most) of the positive instances 4. Initialize 5. Initialize 6. Repeat the inner loop adds atoms to until covers only (or mainly) positive instances 7. Select an atom to add to . This is a nondeterministic choice point that can be used for backtracking. 8. 9. Until covers only (or mainly) positive instances in 10. We add the rule to the set of rules. 11. (the positive instances in covered by ) 12. Until covers all (or most) of positive instance in cur     T             cur ,    cur cur    cur   
  • 20. Page 20=== Learning First-Order Logic Rules  Inductive logic programming (ILP) – Concentrate on methods for inductive learning of Horn clauses in first order predicate calculus (FOPC) and thus PROLOG program. – FOIL [Quinlan, 1990]  The Objective of ILP – To learn a program, ,consisting of Horn clauses, ,each of which is of the form where, the are atomic formulas that unify with ground atomic facts. • : should evaluate to True when its variables are bound to some set of values known to be in the relation we are trying to learn (positive instance: training set). • : should evaluate to False when its variables are bound to some set of values known not to be in the relation (negative instance).   i ,,,: 21  i      
  • 21. Page 21===  We want to cover the positives instances and not cover negative ones.  Background knowledge –The ground atomic facts with which the are to unify. –They are given-as either subsidiary PROLOG programs, which can be run and evaluated, or explicitly in the form of a list of facts.  Example: A delivery robot navigating around in a building finds through experience, that it is easy to go between certain pairs of locations and not so easy to go between certain other pairs. Learning First-Order Logic Rules (2)  
  • 22. Page 22===  A, B, C: junctions  All of the other locations: shops  Junction(x) –Whether junction or not.  Shop(x,y) –Whether shop or not which is connected to junction x. Learning First-Order Logic Rules (3)
  • 23. Page 23=== Learning First-Order Logic Rules (4) }CC2,,CC1,,C2C,,C1C,,BB2,,B1B, ,B2B,,B1B,,AA2,,AA1,,A2A,,A1A, ,BC,,AC,,AB,,CB,,CA,,BA,{ Ξ:EasyofinstancesPositive     }CB2,,CB1,,CA2,,CA1,,BA2,,BA1, ,BC2,,BC1,,AC2,,AC1,,AB2,,AB1, ,B2C,,B1C,,A2C,,A1C,,A2B,,A1B, ,C2B,,C1B,,C2A,,C1A,,B2A,,B1A,{ Ξ:EasyofinstancesNegative       We want a learning program to learn a program, Easy(x,y) that covers the positive instances in but not the negative ones.  Easy(x,y) can use the background subexpressions Junction(x) and Shop(x,y).  Training set 
  • 24. Page 24=== –For all of the locations named in , only the following pairs give a value True for Shop: –The following PROLOG program covers all of the positive instances of the training set and none of the negative ones Easy(x, y) :- Junction(x), Junction(y) :- Shop(x, y) :- Shop(y, x) Learning First-Order Logic Rules (5)  }CC2,,CC1,,BB2,,BB1,,AA2,,AA1,{ 
  • 25. Page 25===  Learning process: generalized separate and conquer algorithm (GSCA) –Start with a program having a single rule with no body –Add literals to the body until the rule covers only (or mainly) positive instances –Add rules in the same way until the program covers all (or most) and only (with few exceptions) positive instances. Learning First-Order Logic Rules (6)
  • 26. Page 26=== –Practical ILP systems restrict the literals in various ways. –Typical allowed additions are • Literals used in the background knowledge • Literals whose arguments are a subset of those in the head of the clause. • Literals that introduce a new distinct variable different from those in the head of the clause. • A literal that equates a variable in the head of the clause with another such variable or with a term mentioned in the background knowledge. • A literal that is the same (except for its arguments) as that in the head of the clause. Learning First-Order Logic Rules (7)
  • 27. Page 27=== Learning First-Order Logic Rules (8)  The literals that we might consider adding to a clause are  ILP version of GSCA – First, initialize first clause as Easy(x, y) :- – Add Junction(x), so Easy(x, y) :- Junction(x) covers the following instances – Include more literal ‘Junction(y)’  Easy(x, y) :- Junction(x), Junction(y) Junction(x), Junction(y), Junction(z) Shop(x,y), Shop(y,x), Shop(x,z) Shop(z,y), (x=y) }C2C,,C1C,,B2B,,B1B,,A2A,,A1A, ,BC,,AC,,AB,,CB,,CA,,BA,{   }C2B,,C1B,,A2B,,A1B,,B2C,,B1C, ,A2C,,A1C,,C2A,,C1A,,B2A,,B1A,{   Positive instances Negative instances }BC,,AC,,AB,,CB,,CA,,BA,{ 
  • 28. Page 28=== –But program does not cover the following positive instances. –Remove the positive instance covered by Easy(x,y):-Junction(x), Junction(y) from to form the to be used in next pass through inner loop. • : all negative instance in + the positive instance that are not covered yet. –Inner loop create another initial clause “Easy(x,y) :-” • Add literal Shop(x,y) : Easy(x,y) :- Shop(x,y)  cover no negative instances, so we are finished with another pass through inner loop. • Covered positive instance by this rule ( remove this from ) Learning First-Order Logic Rules (9)  }CC2,,CC1,,C2C,,C1C,,BB2,,BB1, ,B2B,,B1B,,AA2,,AA1,,A2A,,A1A,{    CUR CUR }CC2,,CC1,,BB2,,BB1,,AA2,,AA1,{  CUR
  • 29. Page 29=== –Now we have Easy(x,y) :- Junction(x), Junction(y) :- Shop(x, y) –To cover following instance –Add Shop(y, x) –Then we have Easy(x,y) :- Junction(x), Junction(y) :- Shop(x, y) :- Shop(y, x) –This cover only positive instances. Learning First-Order Logic Rules (10) }C2C,,C1C,,B2B,,B1B,,A2A,,A1A,{ 
  • 30. Page 30=== Explanation-Based Generalization (1)  Example: “Block world” –General knowledge of the “Block world”. • Rules • Fact • We want to proof “ ” • Proof is very simple 
  • 31. Page 31=== Explanation-Based Generalization (2)  Explanation: Set of facts used in the proof –Ex) explanation for “ ” is “ ” –From this explanation, we can make “ ” • Replacing constant ‘A’ by variable ‘x’, then, we have “Green(x)” • Then we can proof “ ”, as like the case of “ ” • Explanation Based Generalization  Explanation-based generalization (EBG): Generalizing the explanation by replacing constant by variable –More rules might slow down the reasoning process, so EBG must be used with care-possibly by keeping information about the utility of the learned rules.