SlideShare a Scribd company logo
1 of 29
Probabilistic Models
with Latent Variables
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 1
Density Estimation Problem
β€’ Learning from unlabeled data π‘₯1, π‘₯2, … , π‘₯𝑁
β€’ Unsupervised learning, density estimation
β€’ Empirical distribution typically has multiple modes
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 2
Density Estimation Problem
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 3
From http://courses.ee.sun.ac.za/Pattern_Recognition_813
From http://yulearning.blogspot.co.uk
Density Estimation Problem
β€’ Conv. composition of unimodal pdf’s: multimodal pdf
𝑓 π‘₯ = π‘˜ π‘€π‘˜π‘“π‘˜(π‘₯) where π‘˜ π‘€π‘˜ = 1
β€’ Physical interpretation
β€’ Sub populations
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 4
Latent Variables
β€’ Introduce new variable 𝑍𝑖 for each 𝑋𝑖
β€’ Latent / hidden: not observed in the data
β€’ Probabilistic interpretation
β€’ Mixing weights: π‘€π‘˜ ≑ 𝑝(𝑧𝑖 = π‘˜)
β€’ Mixture densities: π‘“π‘˜(π‘₯) ≑ 𝑝(π‘₯|𝑧𝑖 = π‘˜)
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 5
Generative Mixture Model
For 𝑖 = 1, … , 𝑁
𝑍𝑖~𝑖𝑖𝑑 𝑀𝑒𝑙𝑑
𝑋𝑖~𝑖𝑖𝑑 𝑝(π‘₯|𝑧𝑖)
β€’ 𝑃(π‘₯𝑖, 𝑧𝑖) = 𝑝 𝑧𝑖 𝑝(π‘₯𝑖|𝑧𝑖)
β€’ 𝑃 π‘₯𝑖 = π‘˜ 𝑝(π‘₯𝑖, 𝑧𝑖) recovers mixture
distribution
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 6
𝑍𝑖
𝑋𝑖
𝑁
Plate Notation
Tasks in a Mixture Model
β€’ Inference
𝑃 𝑧 π‘₯ =
𝑖
𝑃(𝑧𝑖|π‘₯𝑖)
β€’ Parameter Estimation
β€’ Find parameters that e.g. maximize likelihood
β€’ Does not decouple according to classes
β€’ Non convex, many local minima
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 7
Example: Gaussian Mixture Model
β€’ Model
For 𝑖 = 1, … , 𝑁
𝑍𝑖~𝑖𝑖𝑑 𝑀𝑒𝑙𝑑(πœ‹)
𝑋𝑖 | 𝑍𝑖 = π‘˜~𝑖𝑖𝑑 𝑁(π‘₯|πœ‡π‘˜, Ξ£)
β€’ Inference
𝑃(𝑧𝑖 = π‘˜|π‘₯𝑖; πœ‡, Ξ£)
β€’ Soft-max function
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 8
Example: Gaussian Mixture Model
β€’ Loglikelihood
β€’ Which training instance comes from which component?
𝑙 πœƒ =
𝑖
log 𝑝 π‘₯𝑖 =
𝑖
log
π‘˜
𝑝 𝑧𝑖 = π‘˜ 𝑝(π‘₯𝑖|𝑧𝑖 = π‘˜)
β€’ No closed form solution for maximizing 𝑙 πœƒ
β€’ Possibility 1: Gradient descent etc
β€’ Possibility 2: Expectation Maximization
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 9
Expectation Maximization Algorithm
β€’ Observation: Know values of 𝑍𝑖 β‡’ easy to maximize
β€’ Key idea: iterative updates
β€’ Given parameter estimates, β€œinfer” all 𝑍𝑖 variables
β€’ Given inferred 𝑍𝑖 variables, maximize wrt parameters
β€’ Questions
β€’ Does this converge?
β€’ What does this maximize?
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 10
Expectation Maximization Algorithm
β€’ Complete loglikelihood
𝑙𝑐 πœƒ =
𝑖
log 𝑝 π‘₯𝑖, 𝑧𝑖 =
𝑖
log 𝑝 𝑧𝑖 𝑝(π‘₯𝑖|𝑧𝑖)
β€’ Problem: 𝑧𝑖 not known
β€’ Possible solution: Replace w/ conditional expectation
β€’ Expected complete loglikelihood
𝑄 πœƒ, πœƒπ‘œπ‘™π‘‘ = 𝐸[
𝑖
log 𝑝 π‘₯𝑖, 𝑧𝑖 ]
Wrt 𝑝(𝑧|π‘₯, πœƒπ‘œπ‘™π‘‘) where πœƒπ‘œπ‘™π‘‘ are the current parameters
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 11
Expectation Maximization Algorithm
𝑄 πœƒ, πœƒπ‘œπ‘™π‘‘ = 𝐸[
𝑖
log 𝑝 π‘₯𝑖, 𝑧𝑖 ]
=
𝑖 π‘˜
𝐸 𝐼 𝑧𝑖 = π‘˜ log[πœ‹π‘˜π‘(π‘₯𝑖|πœƒπ‘˜)]
=
𝑖 π‘˜
𝑝(𝑧𝑖 = π‘˜|π‘₯𝑖, πœƒπ‘œπ‘™π‘‘) log[πœ‹π‘˜π‘(π‘₯𝑖|πœƒπ‘˜)]
=
𝑖 π‘˜
π›Ύπ‘–π‘˜ log πœ‹π‘˜ +
𝑖 π‘˜
π›Ύπ‘–π‘˜ log 𝑝(π‘₯𝑖|πœƒπ‘˜)
Where π›Ύπ‘–π‘˜ = 𝑝(𝑧𝑖 = π‘˜|π‘₯𝑖, πœƒπ‘œπ‘™π‘‘)
β€’ Compare with likelihood for generative classifier
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 12
Expectation Maximization Algorithm
β€’ Expectation Step
β€’ Update π›Ύπ‘–π‘˜ based on current parameters
π›Ύπ‘–π‘˜ =
πœ‹π‘˜π‘ π‘₯𝑖 πœƒπ‘œπ‘™π‘‘,π‘˜
π‘˜ πœ‹π‘˜π‘ π‘₯𝑖 πœƒπ‘œπ‘™π‘‘,π‘˜
β€’ Maximization Step
β€’ Maximize 𝑄 πœƒ, πœƒπ‘œπ‘™π‘‘ wrt parameters
β€’ Overall algorithm
β€’ Initialize all latent variables
β€’ Iterate until convergence
β€’ M Step
β€’ E Step
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 13
Example: EM for GMM
β€’ E Step remains the step for all mixture models
β€’ M Step
β€’ πœ‹π‘˜ = 𝑖 π›Ύπ‘–π‘˜
𝑁
=
π›Ύπ‘˜
𝑁
β€’ πœ‡π‘˜ = 𝑖 π›Ύπ‘–π‘˜π‘₯𝑖
π›Ύπ‘˜
β€’ Ξ£ =?
β€’ Compare with generative classifier
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 14
Analysis of EM Algorithm
β€’ Expected complete LL is a lower bound on LL
β€’ EM iteratively maximizes this lower bound
β€’ Converges to a local maximum of the loglikelihood
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 15
Bayesian / MAP Estimation
β€’ EM overfits
β€’ Possible to perform MAP instead of MLE in M-step
β€’ EM is partially Bayesian
β€’ Posterior distribution over latent variables
β€’ Point estimate over parameters
β€’ Fully Bayesian approach is called Variational Bayes
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 16
(Lloyd’s) K Means Algorithm
β€’ Hard EM for Gaussian Mixture Model
β€’ Point estimate of parameters (as usual)
β€’ Point estimate of latent variables
β€’ Spherical Gaussian mixture components
𝑧𝑖
βˆ—
= arg max
k
𝑝(𝑧𝑖 = π‘˜|π‘₯𝑖, πœƒ) = arg min
π‘˜
π‘₯𝑖 βˆ’ πœ‡π‘˜ 2
2
Where πœ‡π‘˜ =
𝑖:𝑧𝑖=π‘˜ π‘₯𝑖
𝑁
β€’ Most popular β€œhard” clustering algorithm
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 17
K Means Problem
β€’ Given {π‘₯𝑖}, find k β€œmeans” (πœ‡1
βˆ—
, … , πœ‡π‘˜
βˆ—
) and data
assignments (𝑧1
βˆ—
, … , 𝑧𝑁
βˆ—
) such that
πœ‡βˆ—, π‘§βˆ— = arg min
πœ‡,𝑧
𝑖
π‘₯𝑖 βˆ’ πœ‡π‘§π‘– 2
2
β€’ Note: 𝑧𝑖 is k-dimensional binary vector
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 18
Model selection: Choosing K for GMM
β€’ Cross validation
β€’ Plot likelihood on training set and validation set for
increasing values of k
β€’ Likelihood on training set keeps improving
β€’ Likelihood on validation set drops after β€œoptimal” k
β€’ Does not work for k-means! Why?
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 19
Principal Component Analysis: Motivation
β€’ Dimensionality reduction
β€’ Reduces #parameters to estimate
β€’ Data often resides in much lower dimension, e.g., on a line
in a 3D space
β€’ Provides β€œunderstanding”
β€’ Mixture models very restricted
β€’ Latent variables restricted to small discrete set
β€’ Can we β€œrelax” the latent variable?
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 20
Classical PCA: Motivation
β€’ Revisit K-means
min
π‘Š,𝑍
𝐽 π‘Š, 𝑍 = 𝑋 βˆ’ π‘Šπ‘π‘‡ 2
𝐹
β€’ W: matrix containing means
β€’ Z: matrix containing cluster membership vectors
β€’ How can we relax Z and W?
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 21
Classical PCA: Problem
min
π‘Š,𝑍
𝐽 π‘Š, 𝑍 = |𝑋 βˆ’ π‘Šπ‘π‘‡ |2
𝐹
β€’ X : 𝐷 Γ— 𝑁
β€’ Arbitrary Z of size 𝑁 Γ— 𝐿,
β€’ Orthonormal W of size 𝐷 Γ— 𝐿
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 22
Classical PCA: Optimal Solution
β€’ Empirical covariance matrix Ξ£ =
1
𝑁 𝑖 π‘₯𝑖π‘₯𝑖
𝑇
β€’ Scaled and centered data
β€’ π‘Š = 𝑉𝐿 where 𝑉𝐿 contains L Eigen vectors for the L
largest Eigen values of Ξ£
β€’ 𝑧𝑖 = π‘Šπ‘‡π‘₯𝑖
β€’ Alternative solution via Singular Value
Decomposition (SVD)
β€’ W contains the β€œprincipal components” that capture
the largest variance in the data
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 23
Probabilistic PCA
β€’ Generative model
𝑃(𝑧𝑖) = 𝑁(𝑧𝑖|πœ‡0, Ξ£0)
𝑃(π‘₯𝑖|𝑧𝑖) = 𝑁(π‘₯𝑖|π‘Šπ‘§π‘– + πœ‡, Ξ¨)
Ξ¨ forced to be diagonal
β€’ Latent linear models
β€’ Factor Analysis
β€’ Special Case: PCA with Ξ¨ = 𝜎2 𝐼
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 24
Visualization of Generative Process
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 25
From Bishop, PRML
Relationship with Gaussian Density
β€’ πΆπ‘œπ‘£[π‘₯] = π‘Šπ‘Šπ‘‡ + Ξ¨
β€’ Why does Ξ¨ need to be restricted?
β€’ Intermediate low rank parameterization of Gaussian
covariance matrix between full rank and diagonal
β€’ Compare #parameters
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 26
EM for PCA: Rod and Springs
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 27
From Bishop, PRML
Advantages of EM
β€’ Simpler than gradient methods w/ constraints
β€’ Handles missing data
β€’ Easy path for handling more complex models
β€’ Not always the fastest method
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 28
Summary of Latent Variable Models
β€’ Learning from unlabeled data
β€’ Latent variables
β€’ Discrete: Clustering / Mixture models ; GMM
β€’ Continuous: Dimensionality reduction ; PCA
β€’ Summary / β€œUnderstanding” of data
β€’ Expectation Maximization Algorithm
Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 29

More Related Content

What's hot

Hyperparameter Tuning
Hyperparameter TuningHyperparameter Tuning
Hyperparameter TuningJon Lederman
Β 
Decision Tree - ID3
Decision Tree - ID3Decision Tree - ID3
Decision Tree - ID3Xueping Peng
Β 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Dr. C.V. Suresh Babu
Β 
What is the Expectation Maximization (EM) Algorithm?
What is the Expectation Maximization (EM) Algorithm?What is the Expectation Maximization (EM) Algorithm?
What is the Expectation Maximization (EM) Algorithm?Kazuki Yoshida
Β 
Data Visualization in Python
Data Visualization in PythonData Visualization in Python
Data Visualization in PythonJagriti Goswami
Β 
Data preprocessing in Machine learning
Data preprocessing in Machine learning Data preprocessing in Machine learning
Data preprocessing in Machine learning pyingkodi maran
Β 
Prolog Programming : Basics
Prolog Programming : BasicsProlog Programming : Basics
Prolog Programming : BasicsMitul Desai
Β 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchTekendra Nath Yogi
Β 
Machine learning session4(linear regression)
Machine learning   session4(linear regression)Machine learning   session4(linear regression)
Machine learning session4(linear regression)Abhimanyu Dwivedi
Β 
Lecture optimal binary search tree
Lecture optimal binary search tree Lecture optimal binary search tree
Lecture optimal binary search tree Divya Ks
Β 
NAIVE BAYES CLASSIFIER
NAIVE BAYES CLASSIFIERNAIVE BAYES CLASSIFIER
NAIVE BAYES CLASSIFIERKnoldus Inc.
Β 
Visualization and Matplotlib using Python.pptx
Visualization and Matplotlib using Python.pptxVisualization and Matplotlib using Python.pptx
Visualization and Matplotlib using Python.pptxSharmilaMore5
Β 
Ensemble methods in machine learning
Ensemble methods in machine learningEnsemble methods in machine learning
Ensemble methods in machine learningSANTHOSH RAJA M G
Β 
Analytical learning
Analytical learningAnalytical learning
Analytical learningswapnac12
Β 

What's hot (20)

Hyperparameter Tuning
Hyperparameter TuningHyperparameter Tuning
Hyperparameter Tuning
Β 
Decision Tree - ID3
Decision Tree - ID3Decision Tree - ID3
Decision Tree - ID3
Β 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
Β 
What is the Expectation Maximization (EM) Algorithm?
What is the Expectation Maximization (EM) Algorithm?What is the Expectation Maximization (EM) Algorithm?
What is the Expectation Maximization (EM) Algorithm?
Β 
Data Visualization in Python
Data Visualization in PythonData Visualization in Python
Data Visualization in Python
Β 
AI-09 Logic in AI
AI-09 Logic in AIAI-09 Logic in AI
AI-09 Logic in AI
Β 
Data preprocessing in Machine learning
Data preprocessing in Machine learning Data preprocessing in Machine learning
Data preprocessing in Machine learning
Β 
Prolog Programming : Basics
Prolog Programming : BasicsProlog Programming : Basics
Prolog Programming : Basics
Β 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed search
Β 
Propositional Logic and Pridicate logic
Propositional Logic and Pridicate logicPropositional Logic and Pridicate logic
Propositional Logic and Pridicate logic
Β 
Machine learning session4(linear regression)
Machine learning   session4(linear regression)Machine learning   session4(linear regression)
Machine learning session4(linear regression)
Β 
Lecture optimal binary search tree
Lecture optimal binary search tree Lecture optimal binary search tree
Lecture optimal binary search tree
Β 
NAIVE BAYES CLASSIFIER
NAIVE BAYES CLASSIFIERNAIVE BAYES CLASSIFIER
NAIVE BAYES CLASSIFIER
Β 
Visualization and Matplotlib using Python.pptx
Visualization and Matplotlib using Python.pptxVisualization and Matplotlib using Python.pptx
Visualization and Matplotlib using Python.pptx
Β 
Ensemble methods in machine learning
Ensemble methods in machine learningEnsemble methods in machine learning
Ensemble methods in machine learning
Β 
Chapter 4 (final)
Chapter 4 (final)Chapter 4 (final)
Chapter 4 (final)
Β 
Random forest
Random forestRandom forest
Random forest
Β 
Ensemble methods
Ensemble methodsEnsemble methods
Ensemble methods
Β 
Apriori Algorithm
Apriori AlgorithmApriori Algorithm
Apriori Algorithm
Β 
Analytical learning
Analytical learningAnalytical learning
Analytical learning
Β 

Similar to Em algorithm

lecture7.pptx
lecture7.pptxlecture7.pptx
lecture7.pptxssusera013bc
Β 
lecture4.pptx
lecture4.pptxlecture4.pptx
lecture4.pptxRohitPaul71
Β 
Introduction to optimization technique
Introduction to optimization techniqueIntroduction to optimization technique
Introduction to optimization techniqueKAMINISINGH963
Β 
Session 6.pdf
Session 6.pdfSession 6.pdf
Session 6.pdfssuser8cda84
Β 
Session 6.pdf
Session 6.pdfSession 6.pdf
Session 6.pdfssuser8cda84
Β 
Machine learning meetup
Machine learning meetupMachine learning meetup
Machine learning meetupQuantUniversity
Β 
Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models ananth
Β 
Session 4 .pdf
Session 4 .pdfSession 4 .pdf
Session 4 .pdfssuser8cda84
Β 
An Introduction to Reinforcement Learning - The Doors to AGI
An Introduction to Reinforcement Learning - The Doors to AGIAn Introduction to Reinforcement Learning - The Doors to AGI
An Introduction to Reinforcement Learning - The Doors to AGIAnirban Santara
Β 
Responsible AI in Industry: Practical Challenges and Lessons Learned
Responsible AI in Industry: Practical Challenges and Lessons LearnedResponsible AI in Industry: Practical Challenges and Lessons Learned
Responsible AI in Industry: Practical Challenges and Lessons LearnedKrishnaram Kenthapadi
Β 
Keynote at IWLS 2017
Keynote at IWLS 2017Keynote at IWLS 2017
Keynote at IWLS 2017Manish Pandey
Β 
Paper Study: Melding the data decision pipeline
Paper Study: Melding the data decision pipelinePaper Study: Melding the data decision pipeline
Paper Study: Melding the data decision pipelineChenYiHuang5
Β 
03_Optimization (1).pptx
03_Optimization (1).pptx03_Optimization (1).pptx
03_Optimization (1).pptxKHUSHIJAIN197601
Β 

Similar to Em algorithm (20)

lecture7.pptx
lecture7.pptxlecture7.pptx
lecture7.pptx
Β 
lecture4.pptx
lecture4.pptxlecture4.pptx
lecture4.pptx
Β 
lecture4.pptx
lecture4.pptxlecture4.pptx
lecture4.pptx
Β 
lecture1.pptx
lecture1.pptxlecture1.pptx
lecture1.pptx
Β 
Introduction to optimization technique
Introduction to optimization techniqueIntroduction to optimization technique
Introduction to optimization technique
Β 
MS Thesis
MS ThesisMS Thesis
MS Thesis
Β 
MS Thesis
MS ThesisMS Thesis
MS Thesis
Β 
Session 6.pdf
Session 6.pdfSession 6.pdf
Session 6.pdf
Β 
Session 6.pdf
Session 6.pdfSession 6.pdf
Session 6.pdf
Β 
Optforml
OptformlOptforml
Optforml
Β 
Machine learning meetup
Machine learning meetupMachine learning meetup
Machine learning meetup
Β 
Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models Artificial Intelligence Course: Linear models
Artificial Intelligence Course: Linear models
Β 
Session 4 .pdf
Session 4 .pdfSession 4 .pdf
Session 4 .pdf
Β 
Daa unit 1
Daa unit 1Daa unit 1
Daa unit 1
Β 
An Introduction to Reinforcement Learning - The Doors to AGI
An Introduction to Reinforcement Learning - The Doors to AGIAn Introduction to Reinforcement Learning - The Doors to AGI
An Introduction to Reinforcement Learning - The Doors to AGI
Β 
Responsible AI in Industry: Practical Challenges and Lessons Learned
Responsible AI in Industry: Practical Challenges and Lessons LearnedResponsible AI in Industry: Practical Challenges and Lessons Learned
Responsible AI in Industry: Practical Challenges and Lessons Learned
Β 
Keynote at IWLS 2017
Keynote at IWLS 2017Keynote at IWLS 2017
Keynote at IWLS 2017
Β 
Paper Study: Melding the data decision pipeline
Paper Study: Melding the data decision pipelinePaper Study: Melding the data decision pipeline
Paper Study: Melding the data decision pipeline
Β 
03_Optimization (1).pptx
03_Optimization (1).pptx03_Optimization (1).pptx
03_Optimization (1).pptx
Β 
Features.pdf
Features.pdfFeatures.pdf
Features.pdf
Β 

Recently uploaded

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
Β 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
Β 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
Β 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
Β 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
Β 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
Β 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
Β 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
Β 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
Β 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
Β 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
Β 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
Β 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
Β 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
Β 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
Β 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
Β 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
Β 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
Β 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
Β 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
Β 

Recently uploaded (20)

APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
Β 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
Β 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Β 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Β 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
Β 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Β 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Β 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
Β 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
Β 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
Β 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
Β 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Β 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
Β 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
Β 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Β 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
Β 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
Β 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
Β 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
Β 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
Β 

Em algorithm

  • 1. Probabilistic Models with Latent Variables Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 1
  • 2. Density Estimation Problem β€’ Learning from unlabeled data π‘₯1, π‘₯2, … , π‘₯𝑁 β€’ Unsupervised learning, density estimation β€’ Empirical distribution typically has multiple modes Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 2
  • 3. Density Estimation Problem Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 3 From http://courses.ee.sun.ac.za/Pattern_Recognition_813 From http://yulearning.blogspot.co.uk
  • 4. Density Estimation Problem β€’ Conv. composition of unimodal pdf’s: multimodal pdf 𝑓 π‘₯ = π‘˜ π‘€π‘˜π‘“π‘˜(π‘₯) where π‘˜ π‘€π‘˜ = 1 β€’ Physical interpretation β€’ Sub populations Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 4
  • 5. Latent Variables β€’ Introduce new variable 𝑍𝑖 for each 𝑋𝑖 β€’ Latent / hidden: not observed in the data β€’ Probabilistic interpretation β€’ Mixing weights: π‘€π‘˜ ≑ 𝑝(𝑧𝑖 = π‘˜) β€’ Mixture densities: π‘“π‘˜(π‘₯) ≑ 𝑝(π‘₯|𝑧𝑖 = π‘˜) Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 5
  • 6. Generative Mixture Model For 𝑖 = 1, … , 𝑁 𝑍𝑖~𝑖𝑖𝑑 𝑀𝑒𝑙𝑑 𝑋𝑖~𝑖𝑖𝑑 𝑝(π‘₯|𝑧𝑖) β€’ 𝑃(π‘₯𝑖, 𝑧𝑖) = 𝑝 𝑧𝑖 𝑝(π‘₯𝑖|𝑧𝑖) β€’ 𝑃 π‘₯𝑖 = π‘˜ 𝑝(π‘₯𝑖, 𝑧𝑖) recovers mixture distribution Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 6 𝑍𝑖 𝑋𝑖 𝑁 Plate Notation
  • 7. Tasks in a Mixture Model β€’ Inference 𝑃 𝑧 π‘₯ = 𝑖 𝑃(𝑧𝑖|π‘₯𝑖) β€’ Parameter Estimation β€’ Find parameters that e.g. maximize likelihood β€’ Does not decouple according to classes β€’ Non convex, many local minima Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 7
  • 8. Example: Gaussian Mixture Model β€’ Model For 𝑖 = 1, … , 𝑁 𝑍𝑖~𝑖𝑖𝑑 𝑀𝑒𝑙𝑑(πœ‹) 𝑋𝑖 | 𝑍𝑖 = π‘˜~𝑖𝑖𝑑 𝑁(π‘₯|πœ‡π‘˜, Ξ£) β€’ Inference 𝑃(𝑧𝑖 = π‘˜|π‘₯𝑖; πœ‡, Ξ£) β€’ Soft-max function Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 8
  • 9. Example: Gaussian Mixture Model β€’ Loglikelihood β€’ Which training instance comes from which component? 𝑙 πœƒ = 𝑖 log 𝑝 π‘₯𝑖 = 𝑖 log π‘˜ 𝑝 𝑧𝑖 = π‘˜ 𝑝(π‘₯𝑖|𝑧𝑖 = π‘˜) β€’ No closed form solution for maximizing 𝑙 πœƒ β€’ Possibility 1: Gradient descent etc β€’ Possibility 2: Expectation Maximization Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 9
  • 10. Expectation Maximization Algorithm β€’ Observation: Know values of 𝑍𝑖 β‡’ easy to maximize β€’ Key idea: iterative updates β€’ Given parameter estimates, β€œinfer” all 𝑍𝑖 variables β€’ Given inferred 𝑍𝑖 variables, maximize wrt parameters β€’ Questions β€’ Does this converge? β€’ What does this maximize? Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 10
  • 11. Expectation Maximization Algorithm β€’ Complete loglikelihood 𝑙𝑐 πœƒ = 𝑖 log 𝑝 π‘₯𝑖, 𝑧𝑖 = 𝑖 log 𝑝 𝑧𝑖 𝑝(π‘₯𝑖|𝑧𝑖) β€’ Problem: 𝑧𝑖 not known β€’ Possible solution: Replace w/ conditional expectation β€’ Expected complete loglikelihood 𝑄 πœƒ, πœƒπ‘œπ‘™π‘‘ = 𝐸[ 𝑖 log 𝑝 π‘₯𝑖, 𝑧𝑖 ] Wrt 𝑝(𝑧|π‘₯, πœƒπ‘œπ‘™π‘‘) where πœƒπ‘œπ‘™π‘‘ are the current parameters Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 11
  • 12. Expectation Maximization Algorithm 𝑄 πœƒ, πœƒπ‘œπ‘™π‘‘ = 𝐸[ 𝑖 log 𝑝 π‘₯𝑖, 𝑧𝑖 ] = 𝑖 π‘˜ 𝐸 𝐼 𝑧𝑖 = π‘˜ log[πœ‹π‘˜π‘(π‘₯𝑖|πœƒπ‘˜)] = 𝑖 π‘˜ 𝑝(𝑧𝑖 = π‘˜|π‘₯𝑖, πœƒπ‘œπ‘™π‘‘) log[πœ‹π‘˜π‘(π‘₯𝑖|πœƒπ‘˜)] = 𝑖 π‘˜ π›Ύπ‘–π‘˜ log πœ‹π‘˜ + 𝑖 π‘˜ π›Ύπ‘–π‘˜ log 𝑝(π‘₯𝑖|πœƒπ‘˜) Where π›Ύπ‘–π‘˜ = 𝑝(𝑧𝑖 = π‘˜|π‘₯𝑖, πœƒπ‘œπ‘™π‘‘) β€’ Compare with likelihood for generative classifier Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 12
  • 13. Expectation Maximization Algorithm β€’ Expectation Step β€’ Update π›Ύπ‘–π‘˜ based on current parameters π›Ύπ‘–π‘˜ = πœ‹π‘˜π‘ π‘₯𝑖 πœƒπ‘œπ‘™π‘‘,π‘˜ π‘˜ πœ‹π‘˜π‘ π‘₯𝑖 πœƒπ‘œπ‘™π‘‘,π‘˜ β€’ Maximization Step β€’ Maximize 𝑄 πœƒ, πœƒπ‘œπ‘™π‘‘ wrt parameters β€’ Overall algorithm β€’ Initialize all latent variables β€’ Iterate until convergence β€’ M Step β€’ E Step Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 13
  • 14. Example: EM for GMM β€’ E Step remains the step for all mixture models β€’ M Step β€’ πœ‹π‘˜ = 𝑖 π›Ύπ‘–π‘˜ 𝑁 = π›Ύπ‘˜ 𝑁 β€’ πœ‡π‘˜ = 𝑖 π›Ύπ‘–π‘˜π‘₯𝑖 π›Ύπ‘˜ β€’ Ξ£ =? β€’ Compare with generative classifier Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 14
  • 15. Analysis of EM Algorithm β€’ Expected complete LL is a lower bound on LL β€’ EM iteratively maximizes this lower bound β€’ Converges to a local maximum of the loglikelihood Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 15
  • 16. Bayesian / MAP Estimation β€’ EM overfits β€’ Possible to perform MAP instead of MLE in M-step β€’ EM is partially Bayesian β€’ Posterior distribution over latent variables β€’ Point estimate over parameters β€’ Fully Bayesian approach is called Variational Bayes Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 16
  • 17. (Lloyd’s) K Means Algorithm β€’ Hard EM for Gaussian Mixture Model β€’ Point estimate of parameters (as usual) β€’ Point estimate of latent variables β€’ Spherical Gaussian mixture components 𝑧𝑖 βˆ— = arg max k 𝑝(𝑧𝑖 = π‘˜|π‘₯𝑖, πœƒ) = arg min π‘˜ π‘₯𝑖 βˆ’ πœ‡π‘˜ 2 2 Where πœ‡π‘˜ = 𝑖:𝑧𝑖=π‘˜ π‘₯𝑖 𝑁 β€’ Most popular β€œhard” clustering algorithm Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 17
  • 18. K Means Problem β€’ Given {π‘₯𝑖}, find k β€œmeans” (πœ‡1 βˆ— , … , πœ‡π‘˜ βˆ— ) and data assignments (𝑧1 βˆ— , … , 𝑧𝑁 βˆ— ) such that πœ‡βˆ—, π‘§βˆ— = arg min πœ‡,𝑧 𝑖 π‘₯𝑖 βˆ’ πœ‡π‘§π‘– 2 2 β€’ Note: 𝑧𝑖 is k-dimensional binary vector Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 18
  • 19. Model selection: Choosing K for GMM β€’ Cross validation β€’ Plot likelihood on training set and validation set for increasing values of k β€’ Likelihood on training set keeps improving β€’ Likelihood on validation set drops after β€œoptimal” k β€’ Does not work for k-means! Why? Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 19
  • 20. Principal Component Analysis: Motivation β€’ Dimensionality reduction β€’ Reduces #parameters to estimate β€’ Data often resides in much lower dimension, e.g., on a line in a 3D space β€’ Provides β€œunderstanding” β€’ Mixture models very restricted β€’ Latent variables restricted to small discrete set β€’ Can we β€œrelax” the latent variable? Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 20
  • 21. Classical PCA: Motivation β€’ Revisit K-means min π‘Š,𝑍 𝐽 π‘Š, 𝑍 = 𝑋 βˆ’ π‘Šπ‘π‘‡ 2 𝐹 β€’ W: matrix containing means β€’ Z: matrix containing cluster membership vectors β€’ How can we relax Z and W? Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 21
  • 22. Classical PCA: Problem min π‘Š,𝑍 𝐽 π‘Š, 𝑍 = |𝑋 βˆ’ π‘Šπ‘π‘‡ |2 𝐹 β€’ X : 𝐷 Γ— 𝑁 β€’ Arbitrary Z of size 𝑁 Γ— 𝐿, β€’ Orthonormal W of size 𝐷 Γ— 𝐿 Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 22
  • 23. Classical PCA: Optimal Solution β€’ Empirical covariance matrix Ξ£ = 1 𝑁 𝑖 π‘₯𝑖π‘₯𝑖 𝑇 β€’ Scaled and centered data β€’ π‘Š = 𝑉𝐿 where 𝑉𝐿 contains L Eigen vectors for the L largest Eigen values of Ξ£ β€’ 𝑧𝑖 = π‘Šπ‘‡π‘₯𝑖 β€’ Alternative solution via Singular Value Decomposition (SVD) β€’ W contains the β€œprincipal components” that capture the largest variance in the data Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 23
  • 24. Probabilistic PCA β€’ Generative model 𝑃(𝑧𝑖) = 𝑁(𝑧𝑖|πœ‡0, Ξ£0) 𝑃(π‘₯𝑖|𝑧𝑖) = 𝑁(π‘₯𝑖|π‘Šπ‘§π‘– + πœ‡, Ξ¨) Ξ¨ forced to be diagonal β€’ Latent linear models β€’ Factor Analysis β€’ Special Case: PCA with Ξ¨ = 𝜎2 𝐼 Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 24
  • 25. Visualization of Generative Process Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 25 From Bishop, PRML
  • 26. Relationship with Gaussian Density β€’ πΆπ‘œπ‘£[π‘₯] = π‘Šπ‘Šπ‘‡ + Ξ¨ β€’ Why does Ξ¨ need to be restricted? β€’ Intermediate low rank parameterization of Gaussian covariance matrix between full rank and diagonal β€’ Compare #parameters Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 26
  • 27. EM for PCA: Rod and Springs Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 27 From Bishop, PRML
  • 28. Advantages of EM β€’ Simpler than gradient methods w/ constraints β€’ Handles missing data β€’ Easy path for handling more complex models β€’ Not always the fastest method Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 28
  • 29. Summary of Latent Variable Models β€’ Learning from unlabeled data β€’ Latent variables β€’ Discrete: Clustering / Mixture models ; GMM β€’ Continuous: Dimensionality reduction ; PCA β€’ Summary / β€œUnderstanding” of data β€’ Expectation Maximization Algorithm Foundations of Algorithms and Machine Learning (CS60020), IIT KGP, 2017: Indrajit Bhattacharya 29