Lecture # 2-1 Probabilistic Models
Lecture # 2-1 Probabilistic Models
Probabilistic Models
AI-4009 Generative AI
Present
ed by
6 / 31
09/09/2024 Dr.
AKHTAR
JAMIL
Presented
09/09/2024
by Dr. AKHTAR JAMIL 7 / 31
Probabilistic Models: Basic Discrete Distributions
Bernoulli distribution: (biased) coin flip
Domain: { Heads, Tails}
Specify P(X = Heads) = p. Then P(X = Tails) = 1
Present
− p. Write: X ∼ Ber (p) : only one parameter p
ed by
8 / 31
Sampling: flip a (biased) coin
Dr.
09/09/2024
AKHTAR
JAMIL
Categorical distribution: (biased) m-sided dice
Domain: { 1, · · · , Σ
m}
Specify P(Y = i ) = pi , such thatpi =
Write: Y ∼ Cat(p1 , · · · , pm ) : m-1
1
parameters
Sampling: roll a (biased) die
Probabilistic Models: A Multi-Variate
Joint Distribution
• Suppose we want to define a distribution over one pixel in
an image. We use three discrete random variables:
• Red Channel R. Val(R) = {0, · · · ,
255} Present
ed by
AKHTAR
,255}
JAMIL
Present
ed by
AKHTAR
ed by
AKHTAR
. . , xn)?
JAMIL
ed by
AKHTAR
JAMIL
09/09/2024
∩ Sn−1) ed by
Dr.
14 / 31
2
AKHTAR
JAMIL
15 / 31
09/09/2024
JAMIL
09/09/2024
What is a Directed Acyclic
Graph?
Present
ed by
18 / 31
09/09/2024 Dr.
AKHTAR
JAMIL
09/09/2024
Graph Structure Encodes Conditional Independencies
09/09/2024
Bayesian Networks: An Example 2
• Consider a Bayesian Network with five variables.
– Exercise (E): Whether the person exercises regularly (Yes or No).
– Diet (D): Whether the person has a healthy diet (Yes or No).
– Body Weight (BW): Categorized as Underweight, Normal, Overweight.
– Blood Pressure (BP): Categorized as Low, Normal, High.
– Heart Disease Risk (HR): Risk level of heart disease, categorized as Low,
Medium, High.
• : is predicted label
• : Original label
09/09/2024 Presented by Dr. AKHTAR JAMIL 31
Gradient Descent
• Gradient descent is an optimization algorithm
• It helps for searching for the optimal model parameters
• Update parameters according to the gradient values.
• A gradient measures how much the output of a function changes if
you change the parameter values.