Graphical Models in Machine Learning

Graphical models are a class of probabilistic models that use graphs to represent dependencies between variables. They provide a structured way to model uncertainty and complex relationships in data. Graphical models are widely used in speech recognition, natural language processing, and computer vision.

Types of Graphical Models

  1. Bayesian Networks (Directed Graphs): Represent causal relationships between variables using directed edges. Example: Naïve Bayes classifier.

  2. Markov Random Fields (Undirected Graphs): Model joint distributions without assuming causality, using undirected edges. Example: Conditional Random Fields (CRFs).

Generative vs. Discriminative Models

FeatureGenerative ModelsDiscriminative Models
DefinitionModels the joint probability P(X,Y)P(X, Y), learning how data is generated.Models the conditional probability ( P(Y
ObjectiveLearns the distribution of both inputs and outputs.Directly maps inputs to outputs.
ExamplesNaïve Bayes, Gaussian Mixture Models, Hidden Markov Models (HMM).Logistic Regression, Support Vector Machines (SVM), Neural Networks.
StrengthsCan generate new samples and handle missing data well.Typically provides better classification accuracy.
WeaknessesComputationally complex, requires estimating full data distribution.Cannot model data generation process, less flexible.

Key Difference: Generative models aim to understand how data is generated, whereas discriminative models focus on distinguishing between different classes. In applications like speech recognition and computer vision, the choice depends on the need for generation (e.g., text generation) or classification (e.g., object detection).