Unit 4 Notes
Unit 4 Notes
Unit 4 Notes
A certainty factor (CF) is a numerical value that expresses a degree of subjective belief that a
particular item is true. The item may be a fact or a rule. When probabilities are used attention must be
paid to the underlying assumptions and probability distributions in order to show validity. Bayes’ rule
can be used to combine probability measures.
Suppose that a certainty is defined to be a real number between -1.0 and +1.0, where 1.0 represents
complete certainty that an item is true and -1.0 represents complete certainty that an item is false.
Here a CF of 0.0 indicates that no information is available about either the truth or the falsity of an
item. Hence positive values indicate a degree of belief or evidence that an item is true, and negative
values indicate the opposite belief. Moreover it is common to select a positive number that represents
a minimum threshold of belief in the truth of an item. For example, 0.2 is a commonly chosen
threshold value
It is intended to capture the degree to which the evidence increases probability: p(H|E)-p(H)
in proportion to the maximum possible increase in probability: 1-p(H)
2. MD(H, E) – Measure of Disbelief: value between 0 and 1 representing the degree to which
disbelief in the hypothesis H is supported by observing evidence E.
BAYESIAN NETWORK
• A Bayesian network is a probabilistic graphical model that represents a set of variables and
their probabilistic independencies. Otherwise known as Bayes net, Bayesian belief Network
or simply Belief Networks. A Bayesian network specifies a joint distribution in a structured
form. It represent dependencies and independence via a directed graph. Networks of concepts
linked with conditional probabilities.
For eg, evidence says that lab produces 98% accurate results. It means that a person X has
98% malaria or 2% of not having malaria. This factor is called uncertainty factor. This is the reason
that we go for Bayesian theory. Bayesian theory is also known as probability learning.
The probabilities are numeric values between 0 and 1 that represent uncertainties.
i) Simple Bayesian network
p(A,B,C) = p(C|A,B)p(A)p(B)
ii) 3-way Bayesian network (Marginal Independence)
p(A,B,C) = p(B|A)p(C|A)p(A)
B and C are conditionally independent Given A
iv) 3-way Bayesian network (Markov dependence)
Problem 1
You have a new burglar alarm installed. It is reliable about detecting burglary, but responds to minor
earth quakes. Two neighbors (John, Mary) promise to call you at work when they hear the alarm. John
always calls when hears alarm, but confuses with phone ringing. Mary likes lod nusic and sometimes
misses alarm. Find the probability of the event that the alarm has sounded but neither a burglary nor
an earth quake has occurred and both Mary and John call.
Consider 5 binary variables
B=Burglary occurs at your house
E=Earth quake occurs at your home
A=Alarm goes off
J=John calls to report alarm
M=Mary calls to report the alarm
Probability of the event that the alarm has sounded but neither a burglary nor an earth quake has
occurred and both Mary and John call
P(J,M,A,E,B)=P(J|A).P(M|A).P(A|E,B).P(E).P(B)
=0.90*0.70*0.001*0.99*0.998
=0.00062
Problem 2
Rain influences sprinkler usage. Rain and sprinkler influences whether grass is wet or not. What is the
probability that rain gives grass wet?
Solution
Let S= Sprinkler
R=Rain
G=Grass wet
P(G,S,R)=P(G|S,R).P(S|R).P(R)
=0.99*0.01*0.2
=0.00198
Problem 3
Bayesian Classifier: Training Dataset
Class:
C1:buys_computer = ‘yes’
C2:buys_computer = ‘no’
Data sample
X = (age <=30, Income = medium, Student = yes Credit_rating = Fair)
Solution
• P(Ci):
P(buys_computer = “yes”) = 9/14 = 0.643
P(buys_computer = “no”) = 5/14= 0.357
• Compute P(X|Ci) for each class
P(age = “<=30” | buys_computer = “yes”) = 2/9 = 0.222
P(age = “<= 30” | buys_computer = “no”) = 3/5 = 0.6
P(income = “medium” | buys_computer = “yes”) = 4/9 = 0.444
P(income = “medium” | buys_computer = “no”) = 2/5 = 0.4
P(student = “yes” | buys_computer = “yes) = 6/9 = 0.667
P(student = “yes” | buys_computer = “no”) = 1/5 = 0.2
P(credit_rating = “fair” | buys_computer = “yes”) = 6/9 = 0.667
P(credit_rating = “fair” | buys_computer = “no”) = 2/5 = 0.4
• X = (age <= 30 , income = medium, student = yes, credit_rating = fair)
P(X|Ci) :
P(X|buys_computer = “yes”) = 0.222 x 0.444 x 0.667 x 0.667 = 0.044
P(X|buys_computer = “no”) = 0.6 x 0.4 x 0.2 x 0.4 = 0.019
P(X|Ci)*P(Ci) :
P(X|buys_computer = “yes”) * P(buys_computer = “yes”) = 0.028
P(X|buys_computer = “no”) * P(buys_computer = “no”) = 0.007
Therefore, X belongs to class (“buys_computer = yes”)
Problem 4
Did the patient have malignant tumour or not?
A patient takes a lab test and the result comes back positive. The test returns a correct positive
result in only 98% of the cases in which a malignant tumour actually present, and a correct negative
result in only 97% of the cases in which it is not present. Furthermore, o.oo8 of the entire population
have this tumour.
Solution:
P(tumour)=0.008 P(tumour)=0.992
P(+|tumour)=0.98 P(-|tumour)=0.02
P(+|tumour)=0.03 P(-|tumour)=0.97
The probability of not having tumour is high. So the person is not having malignant tumour.
Problem 1
• 4 people (B, J, S and K) are locked in a room when the lights go out.
• When the lights come on, K is dead, stabbed with a knife.
• Not suicide (stabbed in the back)
• No-one entered the room.
• Assume only one killer.
• ʘ= { B, J, S}
• P(ʘ) = (Ø, {B}, {J}, {S}, {B,J}, {B,S}, {J,S}, {B,J,S} )
Mass function m(A):
• Detectives, after reviewing the crime-scene, assign mass probabilities to various elements of the
power set:
The certainty associated with a given subset A is defined by the belief interval: [ bel(A) pl(A) ].
From this we observed that J is a killer.
FUZZY REASONING
Fuzzy Logic (FL) is a method of reasoning that resembles human reasoning. The approach of
FL imitates the way of decision making in humans that involves all intermediate possibilities
between digital values YES and NO. In fuzzy logic, the degree of truth is between 0 and 1.
Example: William is smart (0.8 truth)
The fuzzy logic works on the levels of possibilities of input to achieve the definite output.
Fuzzy logic is useful for commercial and practical purposes.
It can control machines and consumer products.
It may not give accurate reasoning, but acceptable reasoning.
Fuzzy logic helps to deal with the uncertainty in engineering.
LP x is Large Positive
MP x is Medium Positive
S x is Small
MN x is Medium Negative
LN x is Large Negative
Here, the input to 5-level fuzzifier varies from -10 volts to +10 volts. Hence the corresponding
output also changes.
Build a set of rules into the knowledge base in the form of IF-THEN-ELSE structures.