SlideShare a Scribd company logo
Machine Learning Interviews – 
Day 4 
Arpit Agarwal
Meta-Idea 
Probability 
Model Data 
Inference 
(Likelihood) 
A model of the data generating process gives rise to data. 
Model estimation from data is most commonly through Likelihood estimation
Likelihood Function 
P Data Model P Model 
( | ) ( ) 
( ) 
( | ) 
P Data 
P Model Data  
Likelihood Function 
Find the “best” model which has generated the data. In a likelihood function 
the data is considered fixed and one searches for the best model over the 
different choices available.
Maximum Likelihood Estimation 
• We want to select a model which will 
maximize the probability that the data was 
generated from the model 
maxlog P(Data|Model)
Examples 
• Suppose we have the following data 
– 0,1,1,0,0,1,1,0 
• In this case it is sensible to choose the 
Bernoulli distribution (B(p)) as the model 
space. 
• Now we want to choose the best p, i.e.,
Examples 
Suppose the following are marks in a course 
55.5, 67, 87, 48, 63 
Marks typically follow a Normal distribution 
whose density function is 
Now, we want to find the best , such that
Examples – Mixture of Gaussian 
• Suppose we have data about heights of 
people (in cm) 
– 185,140,134,150,170 
• Heights follow a normal (log normal) 
distribution but men on average are taller 
than women. This suggests a mixture of two 
distributions
Mixture of Gaussians 
• The density function is given by 
where = probability that a random point is 
generated from k-th gaussian
0.5 
0.4 
0.3 
0.2 
0.1 
0 
Component 1 Component 2 
-5 0 5 10 
p(x) 
0.5 
0.4 
0.3 
0.2 
0.1 
0 
Mixture Model 
-5 0 5 10 
x 
p(x)
Mixture of Gaussian 
• Let D = {x(1),x(2),…x(n)} be a set of n observations 
points generated from a mixture of k gaussians. 
• Let H = {z(1),z(2),..z(n)} be a set of n values of a hidden 
variable Z. 
– z(i) corresponds to the gaussian to which x(i) belongs 
• Our goal is to find out the best , and 
• For a new data point find out which gaussian it belongs 
to.
Mixture of Gaussian – ML approach 
• Maximize the log-likelihood 
• Difficult to solve in general. 
• Idea: Introduce z(i)’s in the optimization problem
Solution – EM Algorithm 
• We use EM when we want to do maximum likelihood 
parameter estimation but we have hidden data in our model. 
• The log-likelihood of the observed data is 
  
log p(D | ) log p(D,H | ) 
H 
• As the likelihood might also depend on the values of the 
hidden data, not only do we have to estimate  but also H
EM Algorithm - Outline 
• start with initial guess of parameters 
• E step: based on the current parameters and 
observer variables find the probability 
distribution over hidden variables 
• M step: with respect to the probability 
distribution over hidden variables, maximize 
the joint log-likelihood. 
• Repeat until convergence
EM Algorithm
Back to Mixture of Gaussians 
• Let D = {x(1),x(2),…x(n)} be a set of n observations 
points generated from a mixture of k gaussians. 
• Let H = {z(1),z(2),..z(n)} be a set of n values of a hidden 
variable Z. 
– z(i) corresponds to the gaussian to which x(i) belongs 
• Our goal is to find out the best , and 
• For a new data point find out which gaussian it belongs 
to.
EM Algorithm for Mixture of Normals
K-Means

More Related Content

What's hot

HistoSketch: Fast Similarity-Preserving Sketching of Streaming Histograms wit...
HistoSketch: Fast Similarity-Preserving Sketching of Streaming Histograms wit...HistoSketch: Fast Similarity-Preserving Sketching of Streaming Histograms wit...
HistoSketch: Fast Similarity-Preserving Sketching of Streaming Histograms wit...
eXascale Infolab
 
18 hashing
18 hashing18 hashing
18 hashing
deonnash
 
Reinforcement Learning with Deep Energy-Based Policies
Reinforcement Learning with Deep Energy-Based PoliciesReinforcement Learning with Deep Energy-Based Policies
Reinforcement Learning with Deep Energy-Based Policies
Sangwoo Mo
 
Eagle Strategy Using Levy Walk and Firefly Algorithms For Stochastic Optimiza...
Eagle Strategy Using Levy Walk and Firefly Algorithms For Stochastic Optimiza...Eagle Strategy Using Levy Walk and Firefly Algorithms For Stochastic Optimiza...
Eagle Strategy Using Levy Walk and Firefly Algorithms For Stochastic Optimiza...
Xin-She Yang
 
Data Streaming Algorithms
Data Streaming AlgorithmsData Streaming Algorithms
Data Streaming Algorithms
宇 傅
 
Machine learning
Machine learningMachine learning
Machine learning
Shreyas G S
 
New zealand bloom filter
New zealand bloom filterNew zealand bloom filter
New zealand bloom filterxlight
 
Convex Hull Approximation of Nearly Optimal Lasso Solutions
Convex Hull Approximation of Nearly Optimal Lasso SolutionsConvex Hull Approximation of Nearly Optimal Lasso Solutions
Convex Hull Approximation of Nearly Optimal Lasso Solutions
Satoshi Hara
 
Algorithms notes tutorials duniya
Algorithms notes   tutorials duniyaAlgorithms notes   tutorials duniya
Algorithms notes tutorials duniya
TutorialsDuniya.com
 
Hashing 1
Hashing 1Hashing 1
Hashing 1
Shyam Khant
 
Error Estimates for Multi-Penalty Regularization under General Source Condition
Error Estimates for Multi-Penalty Regularization under General Source ConditionError Estimates for Multi-Penalty Regularization under General Source Condition
Error Estimates for Multi-Penalty Regularization under General Source Condition
csandit
 
Automatic Gain Tuning based on Gaussian Process Global Optimization (= Bayesi...
Automatic Gain Tuning based on Gaussian Process Global Optimization (= Bayesi...Automatic Gain Tuning based on Gaussian Process Global Optimization (= Bayesi...
Automatic Gain Tuning based on Gaussian Process Global Optimization (= Bayesi...
홍배 김
 
Hashing and Hash Tables
Hashing and Hash TablesHashing and Hash Tables
Hashing and Hash Tables
adil raja
 
Bloom filter
Bloom filterBloom filter
Bloom filter
wang ping
 
Jsai final final final
Jsai final final finalJsai final final final
Jsai final final final
dinesh malla
 
Quadratic probing
Quadratic probingQuadratic probing
Quadratic probing
rajshreemuthiah
 
Binary Heap Tree, Data Structure
Binary Heap Tree, Data Structure Binary Heap Tree, Data Structure
Binary Heap Tree, Data Structure
Anand Ingle
 
Hashing gt1
Hashing gt1Hashing gt1
Hashing gt1
Gopi Saiteja
 

What's hot (20)

HistoSketch: Fast Similarity-Preserving Sketching of Streaming Histograms wit...
HistoSketch: Fast Similarity-Preserving Sketching of Streaming Histograms wit...HistoSketch: Fast Similarity-Preserving Sketching of Streaming Histograms wit...
HistoSketch: Fast Similarity-Preserving Sketching of Streaming Histograms wit...
 
18 hashing
18 hashing18 hashing
18 hashing
 
Reinforcement Learning with Deep Energy-Based Policies
Reinforcement Learning with Deep Energy-Based PoliciesReinforcement Learning with Deep Energy-Based Policies
Reinforcement Learning with Deep Energy-Based Policies
 
Hashing
HashingHashing
Hashing
 
Eagle Strategy Using Levy Walk and Firefly Algorithms For Stochastic Optimiza...
Eagle Strategy Using Levy Walk and Firefly Algorithms For Stochastic Optimiza...Eagle Strategy Using Levy Walk and Firefly Algorithms For Stochastic Optimiza...
Eagle Strategy Using Levy Walk and Firefly Algorithms For Stochastic Optimiza...
 
Data exploration in r
Data exploration in rData exploration in r
Data exploration in r
 
Data Streaming Algorithms
Data Streaming AlgorithmsData Streaming Algorithms
Data Streaming Algorithms
 
Machine learning
Machine learningMachine learning
Machine learning
 
New zealand bloom filter
New zealand bloom filterNew zealand bloom filter
New zealand bloom filter
 
Convex Hull Approximation of Nearly Optimal Lasso Solutions
Convex Hull Approximation of Nearly Optimal Lasso SolutionsConvex Hull Approximation of Nearly Optimal Lasso Solutions
Convex Hull Approximation of Nearly Optimal Lasso Solutions
 
Algorithms notes tutorials duniya
Algorithms notes   tutorials duniyaAlgorithms notes   tutorials duniya
Algorithms notes tutorials duniya
 
Hashing 1
Hashing 1Hashing 1
Hashing 1
 
Error Estimates for Multi-Penalty Regularization under General Source Condition
Error Estimates for Multi-Penalty Regularization under General Source ConditionError Estimates for Multi-Penalty Regularization under General Source Condition
Error Estimates for Multi-Penalty Regularization under General Source Condition
 
Automatic Gain Tuning based on Gaussian Process Global Optimization (= Bayesi...
Automatic Gain Tuning based on Gaussian Process Global Optimization (= Bayesi...Automatic Gain Tuning based on Gaussian Process Global Optimization (= Bayesi...
Automatic Gain Tuning based on Gaussian Process Global Optimization (= Bayesi...
 
Hashing and Hash Tables
Hashing and Hash TablesHashing and Hash Tables
Hashing and Hash Tables
 
Bloom filter
Bloom filterBloom filter
Bloom filter
 
Jsai final final final
Jsai final final finalJsai final final final
Jsai final final final
 
Quadratic probing
Quadratic probingQuadratic probing
Quadratic probing
 
Binary Heap Tree, Data Structure
Binary Heap Tree, Data Structure Binary Heap Tree, Data Structure
Binary Heap Tree, Data Structure
 
Hashing gt1
Hashing gt1Hashing gt1
Hashing gt1
 

Similar to Machine learning interviews day4

Machine learning
Machine learningMachine learning
Machine learning
Sukhwinder Singh
 
MLE.pdf
MLE.pdfMLE.pdf
MLE.pdf
appalondhe2
 
Data mining knowledge representation Notes
Data mining knowledge representation NotesData mining knowledge representation Notes
Data mining knowledge representation Notes
RevathiSundar4
 
Advanced matlab codigos matematicos
Advanced matlab codigos matematicosAdvanced matlab codigos matematicos
Advanced matlab codigos matematicos
Kmilo Bolaños
 
Model Selection and Validation
Model Selection and ValidationModel Selection and Validation
Model Selection and Validation
gmorishita
 
Learn from Example and Learn Probabilistic Model
Learn from Example and Learn Probabilistic ModelLearn from Example and Learn Probabilistic Model
Learn from Example and Learn Probabilistic Model
Junya Tanaka
 
Principle of Maximum Entropy
Principle of Maximum EntropyPrinciple of Maximum Entropy
Principle of Maximum Entropy
Jiawang Liu
 
lecture 5 about lecture 5 about lecture lecture
lecture 5 about lecture 5 about lecture lecturelecture 5 about lecture 5 about lecture lecture
lecture 5 about lecture 5 about lecture lecture
anxiousanoja
 
Practical-bayesian-optimization-of-machine-learning-algorithms_ver2
Practical-bayesian-optimization-of-machine-learning-algorithms_ver2Practical-bayesian-optimization-of-machine-learning-algorithms_ver2
Practical-bayesian-optimization-of-machine-learning-algorithms_ver2Rohit Kumar Gupta
 
Linear Regression.pptx
Linear Regression.pptxLinear Regression.pptx
Linear Regression.pptx
Ramakrishna Reddy Bijjam
 
Hessian Matrices in Statistics
Hessian Matrices in StatisticsHessian Matrices in Statistics
Hessian Matrices in Statistics
Ferris Jumah
 
Bayesian Neural Networks
Bayesian Neural NetworksBayesian Neural Networks
Bayesian Neural Networks
Natan Katz
 
Into to prob_prog_hari
Into to prob_prog_hariInto to prob_prog_hari
Into to prob_prog_hari
Hariharan Chandrasekaran
 
Explore ml day 2
Explore ml day 2Explore ml day 2
Explore ml day 2
preetikumara
 
Decision Tree.pptx
Decision Tree.pptxDecision Tree.pptx
Decision Tree.pptx
Ramakrishna Reddy Bijjam
 
Applications to Central Limit Theorem and Law of Large Numbers
Applications to Central Limit Theorem and Law of Large NumbersApplications to Central Limit Theorem and Law of Large Numbers
Applications to Central Limit Theorem and Law of Large NumbersUniversity of Salerno
 
lec21.VAE_1.pdf
lec21.VAE_1.pdflec21.VAE_1.pdf
lec21.VAE_1.pdf
ssuser979ea9
 
Into to prob_prog_hari (2)
Into to prob_prog_hari (2)Into to prob_prog_hari (2)
Into to prob_prog_hari (2)
Hariharan Chandrasekaran
 
Talk 2
Talk 2Talk 2

Similar to Machine learning interviews day4 (20)

Machine learning
Machine learningMachine learning
Machine learning
 
MLE.pdf
MLE.pdfMLE.pdf
MLE.pdf
 
Data mining knowledge representation Notes
Data mining knowledge representation NotesData mining knowledge representation Notes
Data mining knowledge representation Notes
 
Advanced matlab codigos matematicos
Advanced matlab codigos matematicosAdvanced matlab codigos matematicos
Advanced matlab codigos matematicos
 
Model Selection and Validation
Model Selection and ValidationModel Selection and Validation
Model Selection and Validation
 
Learn from Example and Learn Probabilistic Model
Learn from Example and Learn Probabilistic ModelLearn from Example and Learn Probabilistic Model
Learn from Example and Learn Probabilistic Model
 
Principle of Maximum Entropy
Principle of Maximum EntropyPrinciple of Maximum Entropy
Principle of Maximum Entropy
 
lecture 5 about lecture 5 about lecture lecture
lecture 5 about lecture 5 about lecture lecturelecture 5 about lecture 5 about lecture lecture
lecture 5 about lecture 5 about lecture lecture
 
PhysicsSIG2008-01-Seneviratne
PhysicsSIG2008-01-SeneviratnePhysicsSIG2008-01-Seneviratne
PhysicsSIG2008-01-Seneviratne
 
Practical-bayesian-optimization-of-machine-learning-algorithms_ver2
Practical-bayesian-optimization-of-machine-learning-algorithms_ver2Practical-bayesian-optimization-of-machine-learning-algorithms_ver2
Practical-bayesian-optimization-of-machine-learning-algorithms_ver2
 
Linear Regression.pptx
Linear Regression.pptxLinear Regression.pptx
Linear Regression.pptx
 
Hessian Matrices in Statistics
Hessian Matrices in StatisticsHessian Matrices in Statistics
Hessian Matrices in Statistics
 
Bayesian Neural Networks
Bayesian Neural NetworksBayesian Neural Networks
Bayesian Neural Networks
 
Into to prob_prog_hari
Into to prob_prog_hariInto to prob_prog_hari
Into to prob_prog_hari
 
Explore ml day 2
Explore ml day 2Explore ml day 2
Explore ml day 2
 
Decision Tree.pptx
Decision Tree.pptxDecision Tree.pptx
Decision Tree.pptx
 
Applications to Central Limit Theorem and Law of Large Numbers
Applications to Central Limit Theorem and Law of Large NumbersApplications to Central Limit Theorem and Law of Large Numbers
Applications to Central Limit Theorem and Law of Large Numbers
 
lec21.VAE_1.pdf
lec21.VAE_1.pdflec21.VAE_1.pdf
lec21.VAE_1.pdf
 
Into to prob_prog_hari (2)
Into to prob_prog_hari (2)Into to prob_prog_hari (2)
Into to prob_prog_hari (2)
 
Talk 2
Talk 2Talk 2
Talk 2
 

Recently uploaded

The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 

Recently uploaded (20)

The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 

Machine learning interviews day4

  • 1. Machine Learning Interviews – Day 4 Arpit Agarwal
  • 2. Meta-Idea Probability Model Data Inference (Likelihood) A model of the data generating process gives rise to data. Model estimation from data is most commonly through Likelihood estimation
  • 3. Likelihood Function P Data Model P Model ( | ) ( ) ( ) ( | ) P Data P Model Data  Likelihood Function Find the “best” model which has generated the data. In a likelihood function the data is considered fixed and one searches for the best model over the different choices available.
  • 4. Maximum Likelihood Estimation • We want to select a model which will maximize the probability that the data was generated from the model maxlog P(Data|Model)
  • 5. Examples • Suppose we have the following data – 0,1,1,0,0,1,1,0 • In this case it is sensible to choose the Bernoulli distribution (B(p)) as the model space. • Now we want to choose the best p, i.e.,
  • 6. Examples Suppose the following are marks in a course 55.5, 67, 87, 48, 63 Marks typically follow a Normal distribution whose density function is Now, we want to find the best , such that
  • 7. Examples – Mixture of Gaussian • Suppose we have data about heights of people (in cm) – 185,140,134,150,170 • Heights follow a normal (log normal) distribution but men on average are taller than women. This suggests a mixture of two distributions
  • 8. Mixture of Gaussians • The density function is given by where = probability that a random point is generated from k-th gaussian
  • 9. 0.5 0.4 0.3 0.2 0.1 0 Component 1 Component 2 -5 0 5 10 p(x) 0.5 0.4 0.3 0.2 0.1 0 Mixture Model -5 0 5 10 x p(x)
  • 10. Mixture of Gaussian • Let D = {x(1),x(2),…x(n)} be a set of n observations points generated from a mixture of k gaussians. • Let H = {z(1),z(2),..z(n)} be a set of n values of a hidden variable Z. – z(i) corresponds to the gaussian to which x(i) belongs • Our goal is to find out the best , and • For a new data point find out which gaussian it belongs to.
  • 11. Mixture of Gaussian – ML approach • Maximize the log-likelihood • Difficult to solve in general. • Idea: Introduce z(i)’s in the optimization problem
  • 12. Solution – EM Algorithm • We use EM when we want to do maximum likelihood parameter estimation but we have hidden data in our model. • The log-likelihood of the observed data is   log p(D | ) log p(D,H | ) H • As the likelihood might also depend on the values of the hidden data, not only do we have to estimate  but also H
  • 13. EM Algorithm - Outline • start with initial guess of parameters • E step: based on the current parameters and observer variables find the probability distribution over hidden variables • M step: with respect to the probability distribution over hidden variables, maximize the joint log-likelihood. • Repeat until convergence
  • 15. Back to Mixture of Gaussians • Let D = {x(1),x(2),…x(n)} be a set of n observations points generated from a mixture of k gaussians. • Let H = {z(1),z(2),..z(n)} be a set of n values of a hidden variable Z. – z(i) corresponds to the gaussian to which x(i) belongs • Our goal is to find out the best , and • For a new data point find out which gaussian it belongs to.
  • 16. EM Algorithm for Mixture of Normals