09 AI Probability Based Expert Systems
09 AI Probability Based Expert Systems
EXPERT SYSTEMS
Probability Based Expert Systems
Probability Based Expert Systems
• Expert takes decisions based on institutions
• Expert system is a intuitive decision making
process
• Decisions are based on statements using
probability
• Such systems are called probability based
expert systems
Sources of uncertainty
• Data
– missing data, unreliable, ambiguous, imprecise representation,
inconsistent, subjective, derived from defaults, …
• Expert knowledge
– inconsistency between different experts
– plausibility
• “best guess” of experts
– quality
• causal knowledge
– deep understanding
• statistical associations
– observations
– scope
• only current domain?
Sources of uncertainty
• Knowledge representation
– restricted model of the real system
– limited expressiveness of the representation mechanism
• Inference process
– deductive
• the derived result is formally correct, but wrong in the real
system
– inductive
• new conclusions are not well-founded
– unsound reasoning methods
Sources of uncertainty
• individual rules
– errors
• domain errors
• representation errors
• inappropriate application of the rules
– likelihood of evidence
• for each premise
• for the conclusion
• combination of evidence from multiple premises
Sources of uncertainty
• conflict resolution
• if multiple rules are applicable, which one is selected
– explicit priorities, provided by domain experts
– implicit priorities derived from rule properties
» specificity of patterns, ordering of patterns creation time of rules, most recent
usage, …
• compatibility
– contradictions between rules
– subsumption
• one rule is a more general version of another one
– redundancy
– missing rules
– data fusion
• integration of data from multiple sources
Types of uncertainty
• Type 1
• Uncertainty about the truth of the inputs
• User is best qualified to make judgments
• System may provide advice/ assistance
• Type 2
• Uncertainty about the validity of the rules
• System expert should make risk estimates
/ assign probabilistic values
Uncertainty - Example
Person A walks on Campus towards the bus stop. A few hundred
yards away A sees someone and is quite sure that it's his next-
door neighbor B who usually goes by car to the University. A
screams B's name.
p A B
p AB
pB
– Probability of B occurring given A has occurred
p B A
p BA
pA
Probability
p B A p B A p A
p A B p B A p A
p A B
p AB Bayesian rule
pB
Probability - Bayesian rule
• We have
p BAp A
p AB
pB
• where:
• p(A|B) is the conditional probability that event A occurs given that event
B has occurred;
• p(B|A) is the conditional probability of event B occurring given that
event A has occurred;
• p(A) is the probability of event A occurring;
• p(B) is the probability of event B occurring.
Probability - Bayesian rule
• The joint probability of A if A is dependent on
multiple events
n n
p A Bi p A Bi p Bi
i 1 i 1
A B1
B4
B3 B2
Probability - Bayesian rule
• If the occurrence of event A depends on only
two mutually exclusive events, B and NOT B ,
we obtain:
• Similarly
Problems
• Requires all the probabilities
– (Probabilities of all the symptoms)
• Extremely large number of parameters
• For n diseases & m symptoms
– (n+1)2m parameters
Relevant Symptoms Dependence
Model
• Use only relevant symptoms for calculating
the probability model
• Q = {S1, S2,…, Sj} relevant symptoms
• ⌐Q = {S1, S2,…, Sj} non-relevant/independent
• (Ei∩S1∩S2 ∩ …. ∩Sk)is replaced by
(Ei∩(∩Sj))j∈Q* ∏Pjj∈ ⌐Q
• Number of parameters For n diseases & m
symptoms is reduced to (2r+1n+m)
Independence Model
• Assumes symptoms are independent
• ∴
• = (P(Ei)/P(S1∩S2 ∩ …. ∩Sk))
*(P(s1/Ei)*P(s2/Ei)*….*P(sk/Ei))
• Plausibility
Dempster-Shafer Theory of Evidence
Properties
• Pl(A)≥Cr(A)
• Pl(φ)=Cr(φ)=0
• Pl(U)=Cr(U)=0
• Pl(A)+ Pl(⌐A)≥ 1
• Cr(A)+ Cr(⌐A)≤ 1
• Cr(⌐A)+ Pl(A) = 1
• ⇒ Pl(A) = 1 - Cr(⌐A)
Fuzzy Logic
Probability
• Given P(A) & P(B)
• It is still impossible to determine
• P(A∩B)
• P(A∪B)
Fuzzy Logic
Fuzzy Logic
• Probability P() is replaced by possibility ∏
• Given ∏(A) & ∏(B)
• 0≤ ∏(A) ≤1
• ∏(⌐A)=1 - ∏(A)
• ∏(A∩B) = min(∏(A), ∏(B))
• ∏(A∪B) = max(∏(A), ∏(B))
• ∏(A→B) = min(1,1 - ∏(A)+ ∏(B))
Propagation of Uncertainty
• MB(h1∩h2,e) = min(MB(h1,e),MB(h2,e))
• MD(h1∩h2,e) = max(MD(h1,e),MD(h2,e))
• MB(h1∪h2,e) = max(MB(h1,e),MB(h2,e))
• MD(h1∪h2,e) = min(MD(h1,e),MD(h2,e))
Propagation of Uncertainty
• Theory of evidence
Where,
• K is a normalizing constant that makes m a
probability
Propagation of Uncertainty
• Fuzzy logic
• We use
• ∏(A∩B) = min(∏(A), ∏(B))
• ∏(A∪B) = max(∏(A), ∏(B))
• To derive
• ∏(p∧q(A))= min(∏p(A), ∏q(A))
• ∏(p∨q(A))= max(∏p(A), ∏q(A))
• ∏(⌐p(A))= 1-(∏p(A))
Control Structures With Uncertainty
• expert system exhibits uncertainty ⇒
• exhaustive search through all rules
• select rule with highest probability
• ⇒lot of computer time
• can not rely upon basis Data driven/ Goal
driven control structures
Control Structures With Uncertainty
Control structure for uncertainty base expert system
• Define rule set (set of rules)
• Expert assigns all inputs probabilities (0,1)
• Perform exhaustive search
• Each conclusion will have highest possible probability
– (if conclusions not providing acceptable probability values)
– Expert ⇒ check assigned probability values or
– Expert ⇒ re design expert system
decision threshold value = acceptable possibility value for each conclusion
• For each conclusion check with decision threshold value
– if > threshold value accept as true and proceed
– if < threshold value accept as false and proceed
• Will result in final conclusions with maximum probability
Control Structures With Uncertainty
Programming tools
Support Facilities
Inductive
Hybrid
Domain Specific
Inductive Tools
• Based on machine learning
• Derived from experiments conducted in
machine learning
• Usually large – run on main frames
• Smaller tools can run on PC’s
• Developer feeds examples
• Tools convert examples into rules
• Tools determine the order for the rules
Simple Rule Based Tools
• Uses simple if-then else rules
• Lacks editing features
• Not structured or organized
• Used only if rules< 500
• Simple effective & easy
Structured Rule Based Tools
• Uses simple if-then rules
• Provides editing features
• Rules are organized/ structured
• Offers
– context trees
– Multiple instantiations
– Rule sets (rules can be sub divided into separate sets)
• Used if rules >500
• Can run on PC’s
Hybrid Tools
• Object Oriented
• Problem/facts are represented as objects
• Objects contain both rules and facts
• Support large rules>500 to thousands
• Facilitates complex and graphical interfaces
• Powerful should be Used only if it is worth the
cost
• Usually viewed as research tool
Domain Specific Tools
• Designed to be used for a specific domain only
• Can use any technique
• Can be categorized in any of the above
categories based on the technique used
Expert system shells
• Shell: A special purpose tool designed for
certain types of application in which the user
must only supply the knowledge base
• shell is a ready-made expert system
• with the knowledgebase missing
• instructions for building a knowledgebase
• Used for
– Building Expert system
– Training
Expert system shells
• Shell should support
• Inference engine
• Knowledge base
• user system interface
• Explanation facility
• Knowledge acquisition facility
Expert system shells
• Shell components (categories)
• Knowledge Engineer development aids
• Knowledge acquisition aids
• Data management aids
• Inference engines
• User system interfaces
• Explanation facility
• Language interfaces
Commercial packages
• Commercial tools for designing expert system
shells
– Automated Reasoning Tool (ART)
– Knowledge Engineering Environment (KEE)
– RuleMaster
assignment
Selecting Right Tool For Job
assignment
Applications Of Expert System
• Product specific
– Commodity based
– Embedded
– Eg. Vehicles, home appliances
• Service specific
– Generic, Task based
– Computer help services
• Organization specific
– Corporate goal based
– Corporate use
– Intelligent customer assistant, intell’ proposal generator
• Tack specific
– Personal work stations
– Assist single user
– Intelligent programmer assistant, intelligent sales assist