MACHINE LEARNING
106403Unit 5: Specialized Learning Theories
Q7a. Explain the EM algorithm. Describe the E-step and M-step with an example of parameter estimation in a mixture model.20257m
Unit 5: Specialized Learning Theories
View this question on its own page →Explain the EM algorithm. Describe the E-step and M-step with an example of parameter estimation in a mixture model.
Worked SolutionEM Algorithm (Expectation-Maximization):
Iterative method for MLE in presence of latent variables (e.g., mixture components, missing data). Maximizes intractable directly.
Idea: Iteratively construct lower bound via Jensen, maximize it.
Steps:
Given data , latent , parameters .E-step (Expectation): Compute posterior and expected complete log-likelihood
Equivalent to computing responsibilities .M-step (Maximization):
Iterate until . Guaranteed monotonic increase, converges to local optimum (not necessarily global; restart needed).
Example — Gaussian Mixture Model (GMM) with components:
Model: , latent indicates component.
E-step:
M-step: , , ,
Example numbers: Data {1,2,10}, init → E-step assigns 1,2 to component1 (), 10 to component2 → M-step updates , → iterates.
EM also used in HMM (Baum-Welch), k-means is hard-assignment limit of GMM-EM with spherical .
Q7b. Define the main components of reinforcement learning. Explain the exploration-exploitation tradeoff with an example.20257m
Unit 5: Specialized Learning Theories
View this question on its own page →Define the main components of reinforcement learning. Explain the exploration-exploitation tradeoff with an example.
Worked SolutionMain Components of Reinforcement Learning (RL):
Agent learns policy interacting with environment via trial-reward.
- Agent: Learner/decision maker (robot, game player).
- Environment: External system agent interacts with (maze, market).
- State : Snapshot of environment (position, sensor readings).
- Action : Moves agent can take (up/down, buy/sell).
- Reward : Scalar feedback after action (positive for goal, negative for penalty).
- Policy : Agent's strategy mapping states → actions (deterministic or stochastic), goal to learn optimal .
- Value Function: , — expected cumulative discounted return. Optimal satisfy Bellman equations.
- Model (optional): Transition dynamics and reward model; model-based vs model-free.
- Discount : Balances immediate vs future reward.
Loop: Goal: maximize .
Exploration-Exploitation Trade-off:
- Exploitation: Use best-known action (max ) to maximize immediate reward.
- Exploration: Try random/new actions to discover potentially better long-term rewards.
Too much exploitation → stuck in suboptimal policy (local optimum). Too much exploration → never converges, low reward.
Example: Multi-Armed Bandit / Maze.
- Robot in maze knows one path gives reward 10 (exploitation), but unexplored path may give 100. -greedy: with prob explore random action, else exploit best. Anneal over time. UCB and Thompson Sampling also balance via uncertainty.
In AlphaGo, exploitation = play best known move from , exploration = try novel moves during self-play to improve.
Solution: decay from 1 → 0.1, optimistic initialization, intrinsic motivation.
Q9c. Write short note on: Bayesian Networks20257m
Unit 5: Specialized Learning Theories
View this question on its own page →Write short note on: Bayesian Networks
Worked SolutionBayesian Networks:
Directed Acyclic Graph (DAG) representation of joint distribution .
Structure: Nodes = random variables, directed edges = direct dependencies (parent → child conditional). Each node has Conditional Probability Table (CPT): for discrete, or density for continuous.
Joint factorization: (chain rule with d-separation conditional independencies). Example: , .
Inference: Compute via enumeration, Variable Elimination, Belief Propagation, Junction Tree (exact exponential), or approximate MCMC/Likelihood Weighting. Bayes rule propagates evidence.
Learning:
- Parameter learning: MLE/MAP estimate CPTs from data ().
- Structure learning: Search over DAGs scoring via BIC/MDL, NP-hard.
Advantages: Compact, interpretable causal model, handles missing data, combines prior knowledge, supports both causal and diagnostic reasoning (e.g., ).
Uses: Medical diagnosis (ALARM network), fault detection, speech recognition (HMM is dynamic BN), decision support (Influence Diagrams).
Example: , , CPT, — can query via Bayes net inference.
Limitations: DAG cannot have cycles, eliciting CPTs expensive, inference NP-hard for dense nets. For undirected cyclic dependencies use Markov Random Fields.