MACHINE LEARNING
106403Module 5: Probabilistic & Reinforcement Methods
Q3a. Define how Bayesian networks and Markov random fields are used to represent probability distributions, and briefly describe the trade-offs involved in choosing one versus the other.20227m
Module 5: Probabilistic & Reinforcement Methods
View this question on its own page →Define how Bayesian networks and Markov random fields are used to represent probability distributions, and briefly describe the trade-offs involved in choosing one versus the other.
Worked SolutionBayesian Networks (BN) vs Markov Random Fields (MRF):
Both are Probabilistic Graphical Models representing joint distribution via graph factorization.
Bayesian Networks — Directed Acyclic Graph (DAG):
- Nodes = random variables, directed edges = direct dependencies (parent → child = causal).
- Factorization: (chain rule with conditional independence via d-separation).
- Need Conditional Probability Tables (CPTs) for discrete nodes.
- Represents causal / asymmetric dependencies, natural for generative processes (e.g., disease → symptom).
- Inference: exact (variable elimination, junction tree) NP-hard; approx MCMC.
- Learning: DAG structure learning NP-hard, parameter learning via MLE.
Markov Random Fields — Undirected Graph:
- Nodes linked by undirected edges, factorization over cliques via potentials : where (partition function, global normalization).
- Represents symmetric / non-causal correlations, spatial interactions (e.g., pixels in image — neighboring pixels similar, Ising model).
- Conditional independence via graph separation.
- No CPTs, more flexible for cyclic dependencies.
Trade-offs:
Aspect BN MRF Edge meaning Causal, directed Correlation, undirected Normalization Local (each CPT sums to 1) Global — expensive Cycles Cannot handle directed cycles Handles cycles naturally Interpretability High (causal) Lower Learning complexity Structure NP-hard but local norm easy Potential learning hard, intractable Inference Slightly cheaper if DAG sparse Often costlier due to Use cases Diagnosis, causal reasoning, time series (DBN) Image segmentation, stereo, spatial stats Choosing: Use BN when direction/causality known, need generative sampling, DAG natural. Use MRF when dependencies symmetric, lattice-like, or cyclic correlations (images, social networks). Many distributions can be represented by either with transformations (moralization), but efficiency differs.
Q8a. Write short notes on Probably Approximately Correct (PAC) learning model.20237m
Module 5: Probabilistic & Reinforcement Methods
View this question on its own page →Write short notes on Probably Approximately Correct (PAC) learning model.
Worked SolutionProbably Approximately Correct (PAC) Learning Model (Valiant 1984):
Framework to analyze learnability: when can learner, with high probability, find approximately correct hypothesis with polynomial sample/computation?
Setup: Instance space , concept class , hypothesis space , distribution over , target , training set labeled by .
Learner outputs .
Definition: is PAC-learnable if exists algorithm and polynomial such that for any , any , any , given examples, outputs with .
Error: $Error_D(h)=P_{x\sim D}[h(x)
eq c(x)]$, training error zero for consistent learner.: Accuracy parameter (approximately correct, error ≤). : Confidence (probably, with probability 1-).
Sample complexity bounds:
For finite : sufficient for consistent learner (if realizable). Using Hoeffding: .For infinite , VC-dimension : (agnostic: ).
Examples:
- Conjunctions of literals: PAC-learnable with
- Axis-aligned rectangles in PAC-learnable, .
- Parity not efficiently PAC-learnable.
Agnostic PAC: $c
otin Hh\min_{h\in H}Error_D(h)+\epsilon$.Implications: PAC gives theoretical guarantee linking sample size, hypothesis complexity ( or VC), accuracy and confidence. Guides Occam's razor: simpler needs fewer samples.
Limitations: Distribution-free worst-case, often loose bounds, assumes i.i.d.
Q9b. Write short notes on the following: (b) Reinforcement learning20227m
Module 5: Probabilistic & Reinforcement Methods
View this question on its own page →Write short notes on the following:
(b) Reinforcement learningWorked Solution(b) Reinforcement Learning:
Definition: Paradigm where agent learns optimal policy by interacting with environment and maximizing cumulative reward, not from labeled examples but from delayed reward signal.
Components: Agent, Environment, State , Action , Reward , Policy , Value , Model , discount .
Types:
- Model-free: No explicit model; directly learn . Value-based (Q-learning ), Policy-based (REINFORCE $
abla J=E[
abla\log\pi(a|s) Q]$), Actor-Critic. - Model-based: Learn/know , plan via DP (Value Iteration, MCTS in AlphaGo).
- On-policy (SARSA) learns about being followed; off-policy (Q-learning) learns about optimal from any behavior.
Exploration-Exploitation: -greedy, UCB, Thompson, entropy regularization.
Algorithms: Q-learning, SARSA, DQN (deep with replay + target network), Policy Gradient, PPO, A3C.
Challenges: Credit assignment (delayed reward), exploration, instability, sample inefficiency.
Applications: Game playing (AlphaGo, Atari DQN), robotics control, autonomous driving, recommender systems (long-term engagement), finance trading.
Example: Grid maze: states = cells, actions = up/down/left/right, reward +10 goal, -1 wall, agent via Q-learning propagates values back from goal to learn shortest path.
Differences vs supervised: No correct output provided, only reward; sequential, action affects next state (non-i.i.d).
Rewards shape behavior; reward engineering crucial.
- Model-free: No explicit model; directly learn . Value-based (Q-learning ), Policy-based (REINFORCE $