SlideShare a Scribd company logo
1 of 24
Download to read offline
EXPECTATION-
MAXIMIZATION ALGORITHM
Machine Learning
SIMPLER
WAY TO UNDERSTAND
Imagine you have a puzzle where some pieces are missing.
The EM algorithm helps you complete the puzzle by
guessing what those missing pieces look like.
STEPS
YOU WOULD FOLLOW
GUESS AND IMPROVE (EXPECTATION STEP)
First, you make a guess about what the missing puzzle
pieces might look like. This is like saying, "Hmm, I think the
missing pieces could be this color and shape." Your guess
doesn't have to be perfect; it's just a starting point.
STEPS
YOU WOULD FOLLOW
MAKE IT BETTER (MAXIMIZATION STEP)
Then, you look at the pieces you have and the ones you
guessed. You figure out how to adjust your guess to make
it match the pieces you have as closely as possible. This
step is like tweaking your guess to fit the puzzle better.
STEPS
YOU WOULD FOLLOW
REPEAT UNTIL DONE
You keep doing these two steps over and over, making
your guess better and better each time. It's like refining
your guess until the puzzle is complete.
The EM algorithm is like a smart helper that makes
educated guesses and keeps improving them until the
puzzle is solved. It's great for figuring out things when you
don't have all the information you need.
IN
ACTUAL TERMS
The Expectation-Maximization (EM) algorithm is an
iterative statistical technique used for estimating
parameters of probabilistic models when some of the data
is missing or unobserved. EM is particularly useful in
situations where you have incomplete or partially observed
data, and you want to estimate the underlying hidden
variables or parameters of a statistical model.
IN
ACTUAL TERMS
The Expectation-Maximization (EM) algorithm is an
iterative optimization method that combines different
unsupervised machine learning algorithms to find
maximum likelihood or maximum posterior estimates of
parameters in statistical models that involve unobserved
latent variables.
IN
ACTUAL TERMS
The EM algorithm is commonly used for latent variable
models and can handle missing data. It consists of an
estimation step (E-step) and a maximization step (M-
step), forming an iterative process to improve model fit.
IN
ACTUAL TERMS
In the E step, the algorithm computes the latent
variables i.e. expectation of the log-likelihood using the
current parameter estimates.
In the M step, the algorithm determines the parameters
that maximize the expected log-likelihood obtained in
the E step, and corresponding model parameters are
updated based on the estimated latent variables.
IN
ACTUAL TERMS
By iteratively repeating these steps, the EM algorithm seeks
to maximize the likelihood of the observed data. It is
commonly used for unsupervised learning tasks, such as
clustering, where latent variables are inferred, and has
applications in various fields, including machine learning,
computer vision, and natural language processing.
Source: GeeksforGeeks
function ExpectationMaximization(data, initial_parameters, convergence_threshold, max_iterations):
parameters = initial_parameters
iteration = 0
converged = false
while (iteration < max_iterations and not converged):
# E-Step: Calculate expected values of hidden data
expected_values = EStep(data, parameters)
# M-Step: Update parameter estimates based on expected values
parameters = MStep(data, expected_values)
# Check for convergence based on parameter change
converged = CheckConvergence(parameters, previous_parameters, convergence_threshold)
previous_parameters = parameters # Save parameters for the next iteration
iteration = iteration + 1
return parameters # Final estimated parameters
function EStep(data, parameters):
# Calculate expected values (responsibilities) of hidden data
# Based on the current parameter estimates and observed data
# Return the expected values
PSEUDOCODE
function MStep(data, expected_values):
# Update parameter estimates to maximize the expected log-likelihood
# of the complete data (observed and hidden)
# Return the updated parameter estimates
function CheckConvergence(parameters, previous_parameters, threshold):
# Calculate a measure of how much the parameters have changed
# from the previous iteration (e.g., Euclidean distance or change in log-likelihood)
# Check if the change is smaller than the convergence threshold
# Return true if converged, false otherwise
# Example Usage
data = ... # Your observed data
initial_parameters = ... # Initial parameter values
convergence_threshold = ... # Convergence threshold for parameter change
max_iterations = ... # Maximum number of iterations
estimated_parameters = ExpectationMaximization(data, initial_parameters, convergence_threshold,
max_iterations)
PROBLEM
Imagine you have a bag of colorful candies, but you don't
know how many of each color are in the bag. You want to
figure this out by using the EM algorithm.
STEP-1 (E STEP)
Close your eyes and take out one candy from the bag
without looking.
Now, you ask your friend to guess the color of the
candy.
Your friend makes a guess based on their knowledge of
candies, but they're not entirely sure because they can't
see the candy either. So, they give you their best guess
along with how confident they are in their guess.
1.
2.
3.
STEP-2 (M STEP)
You collect all the guesses and confidence levels from
your friend for the candies you've taken out so far.
You count how many times each color was guessed
and use the confidence levels to estimate the number
of candies of each color in the bag.
You adjust your guess of how many candies of each
color are in the bag based on this new information.
1.
2.
3.
STEP-3 (REPEAT)
Keep repeating these two steps. Each time you do it, your
guess about the candies' colors and amounts gets better
and better. After doing this many times, you'll have a very
good idea of how many candies of each color are in the
bag.
LET’S MAKE IT MATHEMATICAL
For the first candy: 80% chance it's Red, 10% Green, 10%
Blue
For the second candy: 30% Red, 60% Green, 10% Blue
For the third candy: 20% Red, 10% Green, 70% Blue
Suppose you have a bag with red (R), green (G), and blue
(B) candies. You take out one candy at a time and record
your friend's guesses. After several candies, you have these
guesses:
LET’S MAKE IT MATHEMATICAL
For the first candy: 80% chance it's Red, 10% Green, 10%
Blue
For the second candy: 30% Red, 60% Green, 10% Blue
For the third candy: 20% Red, 10% Green, 70% Blue
Suppose you have a bag with red (R), green (G), and blue
(B) candies. You take out one candy at a time and record
your friend's guesses. After several candies, you have these
guesses:
LET’S MAKE IT MATHEMATICAL
Red: (0.80 + 0.30 + 0.20) / 3 = 0.43
Green: (0.10 + 0.60 + 0.10) / 3 = 0.27
Blue: (0.10 + 0.10 + 0.70) / 3 = 0.30
Now, in the M-step, you count the total guesses for each
color and update your estimates:
So, based on these new estimates, you think there are
approximately 43% Red candies, 27% Green candies, and
30% Blue candies in the bag.
You repeat this process many times until your estimates
become very accurate, and you have a good idea of the
candy distribution in the bag. That's how the EM algorithm
works to solve problems like this one!
ADVANTAGES
Handles data with missing values effectively.
Useful for unsupervised learning tasks like clustering.
Robust to noisy data.
Adaptable to various probabilistic models.
Can be applied to large datasets.
Estimates model parameters in mixture distributions.
Guarantees convergence to a local maximum.
Well-founded in statistical theory.
Not very sensitive to initial parameter values.
Versatile for various machine learning applications.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
DISADVANTAGES
Sensitive to initial parameter guesses.
Slow convergence for high-dimensional data.
Limited scalability for very large datasets.
Assumes data is generated from a specific model.
Convergence is not guaranteed for all cases.
Can be computationally intensive for some problems.
1.
2.
3.
4.
5.
6.
THANK YOU

More Related Content

What's hot

Artificial neural network
Artificial neural networkArtificial neural network
Artificial neural networkmustafa aadel
 
PAC Learning and The VC Dimension
PAC Learning and The VC DimensionPAC Learning and The VC Dimension
PAC Learning and The VC Dimensionbutest
 
Optimization in Deep Learning
Optimization in Deep LearningOptimization in Deep Learning
Optimization in Deep LearningYan Xu
 
Ensemble methods in machine learning
Ensemble methods in machine learningEnsemble methods in machine learning
Ensemble methods in machine learningSANTHOSH RAJA M G
 
Fuzzy image processing- fuzzy C-mean clustering
Fuzzy image processing- fuzzy C-mean clusteringFuzzy image processing- fuzzy C-mean clustering
Fuzzy image processing- fuzzy C-mean clusteringFarah M. Altufaili
 
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
 
Machine Learning-Linear regression
Machine Learning-Linear regressionMachine Learning-Linear regression
Machine Learning-Linear regressionkishanthkumaar
 
Fuzzy logic and application in AI
Fuzzy logic and application in AIFuzzy logic and application in AI
Fuzzy logic and application in AIIldar Nurgaliev
 
Digging into the Dirichlet Distribution by Max Sklar
Digging into the Dirichlet Distribution by Max SklarDigging into the Dirichlet Distribution by Max Sklar
Digging into the Dirichlet Distribution by Max SklarHakka Labs
 
Implement principal component analysis (PCA) in python from scratch
Implement principal component analysis (PCA) in python from scratchImplement principal component analysis (PCA) in python from scratch
Implement principal component analysis (PCA) in python from scratchEshanAgarwal4
 
Logistic regression
Logistic regressionLogistic regression
Logistic regressionMartinHogg9
 
Principal component analysis and lda
Principal component analysis and ldaPrincipal component analysis and lda
Principal component analysis and ldaSuresh Pokharel
 
MACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMMACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMPuneet Kulyana
 
Computational Learning Theory
Computational Learning TheoryComputational Learning Theory
Computational Learning Theorybutest
 
K-Folds Cross Validation Method
K-Folds Cross Validation MethodK-Folds Cross Validation Method
K-Folds Cross Validation MethodSHUBHAM GUPTA
 
ML - Multiple Linear Regression
ML - Multiple Linear RegressionML - Multiple Linear Regression
ML - Multiple Linear RegressionAndrew Ferlitsch
 

What's hot (20)

Artificial neural network
Artificial neural networkArtificial neural network
Artificial neural network
 
Machine learning clustering
Machine learning clusteringMachine learning clustering
Machine learning clustering
 
PAC Learning and The VC Dimension
PAC Learning and The VC DimensionPAC Learning and The VC Dimension
PAC Learning and The VC Dimension
 
Optimization in Deep Learning
Optimization in Deep LearningOptimization in Deep Learning
Optimization in Deep Learning
 
Ensemble methods in machine learning
Ensemble methods in machine learningEnsemble methods in machine learning
Ensemble methods in machine learning
 
Fuzzy image processing- fuzzy C-mean clustering
Fuzzy image processing- fuzzy C-mean clusteringFuzzy image processing- fuzzy C-mean clustering
Fuzzy image processing- fuzzy C-mean clustering
 
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?
 
Machine Learning-Linear regression
Machine Learning-Linear regressionMachine Learning-Linear regression
Machine Learning-Linear regression
 
Fuzzy logic and application in AI
Fuzzy logic and application in AIFuzzy logic and application in AI
Fuzzy logic and application in AI
 
Logistic regression
Logistic regressionLogistic regression
Logistic regression
 
Digging into the Dirichlet Distribution by Max Sklar
Digging into the Dirichlet Distribution by Max SklarDigging into the Dirichlet Distribution by Max Sklar
Digging into the Dirichlet Distribution by Max Sklar
 
Gradient descent method
Gradient descent methodGradient descent method
Gradient descent method
 
Implement principal component analysis (PCA) in python from scratch
Implement principal component analysis (PCA) in python from scratchImplement principal component analysis (PCA) in python from scratch
Implement principal component analysis (PCA) in python from scratch
 
Logistic regression
Logistic regressionLogistic regression
Logistic regression
 
Principal component analysis and lda
Principal component analysis and ldaPrincipal component analysis and lda
Principal component analysis and lda
 
MACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMMACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHM
 
Computational Learning Theory
Computational Learning TheoryComputational Learning Theory
Computational Learning Theory
 
Introduction to Soft Computing
Introduction to Soft ComputingIntroduction to Soft Computing
Introduction to Soft Computing
 
K-Folds Cross Validation Method
K-Folds Cross Validation MethodK-Folds Cross Validation Method
K-Folds Cross Validation Method
 
ML - Multiple Linear Regression
ML - Multiple Linear RegressionML - Multiple Linear Regression
ML - Multiple Linear Regression
 

Similar to EM Algorithm

Essentials of machine learning algorithms
Essentials of machine learning algorithmsEssentials of machine learning algorithms
Essentials of machine learning algorithmsArunangsu Sahu
 
Measures of central tendency by maria diza c. febrio
Measures of central tendency by maria diza c. febrioMeasures of central tendency by maria diza c. febrio
Measures of central tendency by maria diza c. febriomariadiza
 
SAMPLING MEAN DEFINITION The term sampling mean is.docx
SAMPLING MEAN  DEFINITION  The term sampling mean is.docxSAMPLING MEAN  DEFINITION  The term sampling mean is.docx
SAMPLING MEAN DEFINITION The term sampling mean is.docxagnesdcarey33086
 
Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1Techglyphs
 
07 dimensionality reduction
07 dimensionality reduction07 dimensionality reduction
07 dimensionality reductionMarco Quartulli
 
3.3 Mean, Median, Mode, Formulas
3.3 Mean, Median, Mode, Formulas3.3 Mean, Median, Mode, Formulas
3.3 Mean, Median, Mode, FormulasJessca Lundin
 
A General Manger of Harley-Davidson has to decide on the size of a.docx
A General Manger of Harley-Davidson has to decide on the size of a.docxA General Manger of Harley-Davidson has to decide on the size of a.docx
A General Manger of Harley-Davidson has to decide on the size of a.docxevonnehoggarth79783
 
Bootcamp of new world to taken seriously
Bootcamp of new world to taken seriouslyBootcamp of new world to taken seriously
Bootcamp of new world to taken seriouslykhaled125087
 
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...Simplilearn
 
Dimd_m_004 DL.pdf
Dimd_m_004 DL.pdfDimd_m_004 DL.pdf
Dimd_m_004 DL.pdfjuan631
 
SAMPLING MEANDEFINITIONThe term sampling mean is a stati.docx
SAMPLING MEANDEFINITIONThe term sampling mean is a stati.docxSAMPLING MEANDEFINITIONThe term sampling mean is a stati.docx
SAMPLING MEANDEFINITIONThe term sampling mean is a stati.docxanhlodge
 
SAMPLING MEANDEFINITIONThe term sampling mean is a stati.docx
SAMPLING MEANDEFINITIONThe term sampling mean is a stati.docxSAMPLING MEANDEFINITIONThe term sampling mean is a stati.docx
SAMPLING MEANDEFINITIONThe term sampling mean is a stati.docxagnesdcarey33086
 
Solving Multiple Square Jigsaw Puzzles with Missing Pieces
Solving Multiple Square Jigsaw Puzzles with Missing PiecesSolving Multiple Square Jigsaw Puzzles with Missing Pieces
Solving Multiple Square Jigsaw Puzzles with Missing PiecesGravitate Project
 
VCE Physics: Dealing with numerical measurments
VCE Physics: Dealing with numerical measurmentsVCE Physics: Dealing with numerical measurments
VCE Physics: Dealing with numerical measurmentsAndrew Grichting
 
Mean-Median-Mode-Range-Demonstration.pptx
Mean-Median-Mode-Range-Demonstration.pptxMean-Median-Mode-Range-Demonstration.pptx
Mean-Median-Mode-Range-Demonstration.pptxssuserb9172b1
 

Similar to EM Algorithm (20)

Regression
RegressionRegression
Regression
 
Essentials of machine learning algorithms
Essentials of machine learning algorithmsEssentials of machine learning algorithms
Essentials of machine learning algorithms
 
Measures of central tendency by maria diza c. febrio
Measures of central tendency by maria diza c. febrioMeasures of central tendency by maria diza c. febrio
Measures of central tendency by maria diza c. febrio
 
Ficha 1 errores
Ficha 1 erroresFicha 1 errores
Ficha 1 errores
 
SAMPLING MEAN DEFINITION The term sampling mean is.docx
SAMPLING MEAN  DEFINITION  The term sampling mean is.docxSAMPLING MEAN  DEFINITION  The term sampling mean is.docx
SAMPLING MEAN DEFINITION The term sampling mean is.docx
 
Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1
 
Probability module 1
Probability module 1Probability module 1
Probability module 1
 
07 dimensionality reduction
07 dimensionality reduction07 dimensionality reduction
07 dimensionality reduction
 
3.3 Mean, Median, Mode, Formulas
3.3 Mean, Median, Mode, Formulas3.3 Mean, Median, Mode, Formulas
3.3 Mean, Median, Mode, Formulas
 
A General Manger of Harley-Davidson has to decide on the size of a.docx
A General Manger of Harley-Davidson has to decide on the size of a.docxA General Manger of Harley-Davidson has to decide on the size of a.docx
A General Manger of Harley-Davidson has to decide on the size of a.docx
 
Bootcamp of new world to taken seriously
Bootcamp of new world to taken seriouslyBootcamp of new world to taken seriously
Bootcamp of new world to taken seriously
 
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 1 | Machine Learning Tutorial For Beginners ...
 
Explore ml day 2
Explore ml day 2Explore ml day 2
Explore ml day 2
 
Dimd_m_004 DL.pdf
Dimd_m_004 DL.pdfDimd_m_004 DL.pdf
Dimd_m_004 DL.pdf
 
SAMPLING MEANDEFINITIONThe term sampling mean is a stati.docx
SAMPLING MEANDEFINITIONThe term sampling mean is a stati.docxSAMPLING MEANDEFINITIONThe term sampling mean is a stati.docx
SAMPLING MEANDEFINITIONThe term sampling mean is a stati.docx
 
SAMPLING MEANDEFINITIONThe term sampling mean is a stati.docx
SAMPLING MEANDEFINITIONThe term sampling mean is a stati.docxSAMPLING MEANDEFINITIONThe term sampling mean is a stati.docx
SAMPLING MEANDEFINITIONThe term sampling mean is a stati.docx
 
Numerical Method
Numerical Method Numerical Method
Numerical Method
 
Solving Multiple Square Jigsaw Puzzles with Missing Pieces
Solving Multiple Square Jigsaw Puzzles with Missing PiecesSolving Multiple Square Jigsaw Puzzles with Missing Pieces
Solving Multiple Square Jigsaw Puzzles with Missing Pieces
 
VCE Physics: Dealing with numerical measurments
VCE Physics: Dealing with numerical measurmentsVCE Physics: Dealing with numerical measurments
VCE Physics: Dealing with numerical measurments
 
Mean-Median-Mode-Range-Demonstration.pptx
Mean-Median-Mode-Range-Demonstration.pptxMean-Median-Mode-Range-Demonstration.pptx
Mean-Median-Mode-Range-Demonstration.pptx
 

More from To Sum It Up

Prompt Engineering | Beginner's Guide - For You
Prompt Engineering | Beginner's Guide - For YouPrompt Engineering | Beginner's Guide - For You
Prompt Engineering | Beginner's Guide - For YouTo Sum It Up
 
Natural Language Processing (NLP) | Basics
Natural Language Processing (NLP) | BasicsNatural Language Processing (NLP) | Basics
Natural Language Processing (NLP) | BasicsTo Sum It Up
 
It's Machine Learning Basics -- For You!
It's Machine Learning Basics -- For You!It's Machine Learning Basics -- For You!
It's Machine Learning Basics -- For You!To Sum It Up
 
Polymorphism in Python
Polymorphism in PythonPolymorphism in Python
Polymorphism in PythonTo Sum It Up
 
Web API - Overview
Web API - OverviewWeb API - Overview
Web API - OverviewTo Sum It Up
 
User story mapping
User story mappingUser story mapping
User story mappingTo Sum It Up
 
Problem solving using computers - Unit 1 - Study material
Problem solving using computers - Unit 1 - Study materialProblem solving using computers - Unit 1 - Study material
Problem solving using computers - Unit 1 - Study materialTo Sum It Up
 
Problem solving using computers - Chapter 1
Problem solving using computers - Chapter 1 Problem solving using computers - Chapter 1
Problem solving using computers - Chapter 1 To Sum It Up
 
Quality Circle | Case Study on Self Esteem | Team Opus Geeks.pdf
Quality Circle | Case Study on Self Esteem | Team Opus Geeks.pdfQuality Circle | Case Study on Self Esteem | Team Opus Geeks.pdf
Quality Circle | Case Study on Self Esteem | Team Opus Geeks.pdfTo Sum It Up
 
Multimedia Content and Content Acquisition
Multimedia Content and Content AcquisitionMultimedia Content and Content Acquisition
Multimedia Content and Content AcquisitionTo Sum It Up
 
PHP Arrays_Introduction
PHP Arrays_IntroductionPHP Arrays_Introduction
PHP Arrays_IntroductionTo Sum It Up
 
System Calls - Introduction
System Calls - IntroductionSystem Calls - Introduction
System Calls - IntroductionTo Sum It Up
 
Programming The Basic Computer
Programming The Basic ComputerProgramming The Basic Computer
Programming The Basic ComputerTo Sum It Up
 
Ozone in wastewater treatment
Ozone in wastewater treatmentOzone in wastewater treatment
Ozone in wastewater treatmentTo Sum It Up
 

More from To Sum It Up (20)

Prompt Engineering | Beginner's Guide - For You
Prompt Engineering | Beginner's Guide - For YouPrompt Engineering | Beginner's Guide - For You
Prompt Engineering | Beginner's Guide - For You
 
Natural Language Processing (NLP) | Basics
Natural Language Processing (NLP) | BasicsNatural Language Processing (NLP) | Basics
Natural Language Processing (NLP) | Basics
 
It's Machine Learning Basics -- For You!
It's Machine Learning Basics -- For You!It's Machine Learning Basics -- For You!
It's Machine Learning Basics -- For You!
 
Polymorphism in Python
Polymorphism in PythonPolymorphism in Python
Polymorphism in Python
 
DSA Question Bank
DSA Question BankDSA Question Bank
DSA Question Bank
 
Web API - Overview
Web API - OverviewWeb API - Overview
Web API - Overview
 
CSS Overview
CSS OverviewCSS Overview
CSS Overview
 
HTML Overview
HTML OverviewHTML Overview
HTML Overview
 
User story mapping
User story mappingUser story mapping
User story mapping
 
User stories
User storiesUser stories
User stories
 
Problem solving using computers - Unit 1 - Study material
Problem solving using computers - Unit 1 - Study materialProblem solving using computers - Unit 1 - Study material
Problem solving using computers - Unit 1 - Study material
 
Problem solving using computers - Chapter 1
Problem solving using computers - Chapter 1 Problem solving using computers - Chapter 1
Problem solving using computers - Chapter 1
 
Quality Circle | Case Study on Self Esteem | Team Opus Geeks.pdf
Quality Circle | Case Study on Self Esteem | Team Opus Geeks.pdfQuality Circle | Case Study on Self Esteem | Team Opus Geeks.pdf
Quality Circle | Case Study on Self Esteem | Team Opus Geeks.pdf
 
Multimedia Content and Content Acquisition
Multimedia Content and Content AcquisitionMultimedia Content and Content Acquisition
Multimedia Content and Content Acquisition
 
PHP Arrays_Introduction
PHP Arrays_IntroductionPHP Arrays_Introduction
PHP Arrays_Introduction
 
System Calls - Introduction
System Calls - IntroductionSystem Calls - Introduction
System Calls - Introduction
 
Leadership
LeadershipLeadership
Leadership
 
Programming The Basic Computer
Programming The Basic ComputerProgramming The Basic Computer
Programming The Basic Computer
 
SQL | DML
SQL | DMLSQL | DML
SQL | DML
 
Ozone in wastewater treatment
Ozone in wastewater treatmentOzone in wastewater treatment
Ozone in wastewater treatment
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 

Recently uploaded (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 

EM Algorithm

  • 2. SIMPLER WAY TO UNDERSTAND Imagine you have a puzzle where some pieces are missing. The EM algorithm helps you complete the puzzle by guessing what those missing pieces look like.
  • 3. STEPS YOU WOULD FOLLOW GUESS AND IMPROVE (EXPECTATION STEP) First, you make a guess about what the missing puzzle pieces might look like. This is like saying, "Hmm, I think the missing pieces could be this color and shape." Your guess doesn't have to be perfect; it's just a starting point.
  • 4. STEPS YOU WOULD FOLLOW MAKE IT BETTER (MAXIMIZATION STEP) Then, you look at the pieces you have and the ones you guessed. You figure out how to adjust your guess to make it match the pieces you have as closely as possible. This step is like tweaking your guess to fit the puzzle better.
  • 5. STEPS YOU WOULD FOLLOW REPEAT UNTIL DONE You keep doing these two steps over and over, making your guess better and better each time. It's like refining your guess until the puzzle is complete.
  • 6. The EM algorithm is like a smart helper that makes educated guesses and keeps improving them until the puzzle is solved. It's great for figuring out things when you don't have all the information you need.
  • 7. IN ACTUAL TERMS The Expectation-Maximization (EM) algorithm is an iterative statistical technique used for estimating parameters of probabilistic models when some of the data is missing or unobserved. EM is particularly useful in situations where you have incomplete or partially observed data, and you want to estimate the underlying hidden variables or parameters of a statistical model.
  • 8. IN ACTUAL TERMS The Expectation-Maximization (EM) algorithm is an iterative optimization method that combines different unsupervised machine learning algorithms to find maximum likelihood or maximum posterior estimates of parameters in statistical models that involve unobserved latent variables.
  • 9. IN ACTUAL TERMS The EM algorithm is commonly used for latent variable models and can handle missing data. It consists of an estimation step (E-step) and a maximization step (M- step), forming an iterative process to improve model fit.
  • 10. IN ACTUAL TERMS In the E step, the algorithm computes the latent variables i.e. expectation of the log-likelihood using the current parameter estimates. In the M step, the algorithm determines the parameters that maximize the expected log-likelihood obtained in the E step, and corresponding model parameters are updated based on the estimated latent variables.
  • 11. IN ACTUAL TERMS By iteratively repeating these steps, the EM algorithm seeks to maximize the likelihood of the observed data. It is commonly used for unsupervised learning tasks, such as clustering, where latent variables are inferred, and has applications in various fields, including machine learning, computer vision, and natural language processing.
  • 13. function ExpectationMaximization(data, initial_parameters, convergence_threshold, max_iterations): parameters = initial_parameters iteration = 0 converged = false while (iteration < max_iterations and not converged): # E-Step: Calculate expected values of hidden data expected_values = EStep(data, parameters) # M-Step: Update parameter estimates based on expected values parameters = MStep(data, expected_values) # Check for convergence based on parameter change converged = CheckConvergence(parameters, previous_parameters, convergence_threshold) previous_parameters = parameters # Save parameters for the next iteration iteration = iteration + 1 return parameters # Final estimated parameters function EStep(data, parameters): # Calculate expected values (responsibilities) of hidden data # Based on the current parameter estimates and observed data # Return the expected values PSEUDOCODE
  • 14. function MStep(data, expected_values): # Update parameter estimates to maximize the expected log-likelihood # of the complete data (observed and hidden) # Return the updated parameter estimates function CheckConvergence(parameters, previous_parameters, threshold): # Calculate a measure of how much the parameters have changed # from the previous iteration (e.g., Euclidean distance or change in log-likelihood) # Check if the change is smaller than the convergence threshold # Return true if converged, false otherwise # Example Usage data = ... # Your observed data initial_parameters = ... # Initial parameter values convergence_threshold = ... # Convergence threshold for parameter change max_iterations = ... # Maximum number of iterations estimated_parameters = ExpectationMaximization(data, initial_parameters, convergence_threshold, max_iterations)
  • 15. PROBLEM Imagine you have a bag of colorful candies, but you don't know how many of each color are in the bag. You want to figure this out by using the EM algorithm.
  • 16. STEP-1 (E STEP) Close your eyes and take out one candy from the bag without looking. Now, you ask your friend to guess the color of the candy. Your friend makes a guess based on their knowledge of candies, but they're not entirely sure because they can't see the candy either. So, they give you their best guess along with how confident they are in their guess. 1. 2. 3.
  • 17. STEP-2 (M STEP) You collect all the guesses and confidence levels from your friend for the candies you've taken out so far. You count how many times each color was guessed and use the confidence levels to estimate the number of candies of each color in the bag. You adjust your guess of how many candies of each color are in the bag based on this new information. 1. 2. 3.
  • 18. STEP-3 (REPEAT) Keep repeating these two steps. Each time you do it, your guess about the candies' colors and amounts gets better and better. After doing this many times, you'll have a very good idea of how many candies of each color are in the bag.
  • 19. LET’S MAKE IT MATHEMATICAL For the first candy: 80% chance it's Red, 10% Green, 10% Blue For the second candy: 30% Red, 60% Green, 10% Blue For the third candy: 20% Red, 10% Green, 70% Blue Suppose you have a bag with red (R), green (G), and blue (B) candies. You take out one candy at a time and record your friend's guesses. After several candies, you have these guesses:
  • 20. LET’S MAKE IT MATHEMATICAL For the first candy: 80% chance it's Red, 10% Green, 10% Blue For the second candy: 30% Red, 60% Green, 10% Blue For the third candy: 20% Red, 10% Green, 70% Blue Suppose you have a bag with red (R), green (G), and blue (B) candies. You take out one candy at a time and record your friend's guesses. After several candies, you have these guesses:
  • 21. LET’S MAKE IT MATHEMATICAL Red: (0.80 + 0.30 + 0.20) / 3 = 0.43 Green: (0.10 + 0.60 + 0.10) / 3 = 0.27 Blue: (0.10 + 0.10 + 0.70) / 3 = 0.30 Now, in the M-step, you count the total guesses for each color and update your estimates: So, based on these new estimates, you think there are approximately 43% Red candies, 27% Green candies, and 30% Blue candies in the bag. You repeat this process many times until your estimates become very accurate, and you have a good idea of the candy distribution in the bag. That's how the EM algorithm works to solve problems like this one!
  • 22. ADVANTAGES Handles data with missing values effectively. Useful for unsupervised learning tasks like clustering. Robust to noisy data. Adaptable to various probabilistic models. Can be applied to large datasets. Estimates model parameters in mixture distributions. Guarantees convergence to a local maximum. Well-founded in statistical theory. Not very sensitive to initial parameter values. Versatile for various machine learning applications. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.
  • 23. DISADVANTAGES Sensitive to initial parameter guesses. Slow convergence for high-dimensional data. Limited scalability for very large datasets. Assumes data is generated from a specific model. Convergence is not guaranteed for all cases. Can be computationally intensive for some problems. 1. 2. 3. 4. 5. 6.