MLT Unit 2 - Updated
MLT Unit 2 - Updated
(KAI-601)
Unit 2: Regression,
Bayesian Learning and
Support Vector Machine
Suppose we have a dataset of weather conditions and the corresponding target variable "Play".
So using this dataset we need to decide whether we should play or not on a particular day according to the
weather conditions.
Weather No Yes
Overcast 0 5 5/14= 0.35
Rainy 2 2 4/14=0.29
Sunny 2 3 5/14=0.35
All 4/14=0.29 10/14=0.71
Applying Bayes’ theorem:
P(Yes|Sunny)= P(Sunny|Yes)*P(Yes)/P(Sunny)
P(Sunny|Yes)= 3/10= 0.3
P(Sunny)= 0.35
P(Yes)=0.71
So P(Yes|Sunny) = 0.3*0.71/0.35= 0.60
P(No|Sunny)= P(Sunny|No)*P(No)/P(Sunny)
P(Sunny|NO)= 2/4=0.5
P(No)= 0.29
P(Sunny)= 0.35
So P(No|Sunny)= 0.5*0.29/0.35 = 0.41
So as we can see from the above calculation that
P(Yes|Sunny)>P(No|Sunny)
Hence on a Sunny day, Player can play the game.
Bayesian Belief Networks
• Bayesian Belief Network is a graphical representation of different
probabilistic relationships among random variables.
• Bayesian Belief Network is a “Probabilistic Graphical Model” that
represents “Conditional Dependencies” between random variable
through a Directed Acyclic Graph (DAG).
• The probability in Bayesian Belief Network is derived based on a
condition: P(attribute/parent)
(Probability of an attribute, true over the parent attribute)
• Bayesian Belief Network is a classifier with no dependencies oßn attributes
i.e it is condition independent.
• The graph of BBN consists of nodes (variables) and arcs (Causal
Relationaship).
Bayesian Belief Networks
The BBN helps in modelling and reasoning capabilities about the
uncertainties hidden between these random variables with the help of
the dependencies captured via arcs in DAG.
Weather
Health Rainy
Umbrella
Sales
Tea
Green
Leaves
Bayesian Belief Networks
• BBN works on the Joint and Conditional Probability.
• Joint Probability is given as:
P(X1,X2,..,Xn)=∏P(Xi |Parents(Xi))
i=1,..n
If there are two kernels named x1 and x2, the linear kernel can be defined by the dot product of the
two vectors: K(x1, x2) = x1 . X2
Polynomial Kernel
• We can define a polynomial kernel with this equation:
K(x1, x2) = (x1 . x2 + 1)d