Implement the EM algorithm for synthetic data set

Assignment Help Data Structure & Algorithms
Reference no: EM132357814

Algorithms in Machine Learning Assignment -

Question 1 - A certain type of electronic component has a life time X (in hours) with probability density function given by

1147_figure.png

Suppose that three such components, tested independently, had lifetimes of x1 = 120, x2 = 130, and x3 = 128 hours.

(a) Plot the likelihood function P(x|θ) as a function of θ for a single data point x1. From the plot, comment about the most likely value of θ.

(b) On the same plot in part (a), add the likelihood function for each data point x2 and x3. For better visalization, you should use a different colour for each likelihood function.

(c) Write down the likelihood function for N data points P(x1, x2, . . . , xN|θ), then derive the maximum likelihood estimate (MLE) of θ, denoted θ^.

(d) Substitute the values of the given data points x1, x2, x3 into θ^ and compare this result with the plot in (b).

Show and justify all working.

Question 2 - To validate the EM algorithm, we'll test it on a synthetic data set where the parameters πk, μk, ∑k with k = 1, 2 are known. Here we only work with bivariate (or two-dimensional) Gaussians.

Step 1: Generate a sample of size N from a mixture of two bivariate Gaussians. To generate a data point, you pick one of the components with probability πk, then draw a sample xi from that component using mvnrnd(). Repeat these steps for each new data point.

Step 2: Implement the EM algorithm given in the lectures for this synthetic data set. Label your script file my_em.m. Plot your resulting mixture of Gaussians. Are your results closed to the true parameter values?

Step 3: Repeat the Steps 1 and 2 for B = 100 times but keep the same parameter values πk, μk, ∑k. Calculate the means of the estimates for each parameter πk, μk, ∑k and present them in a table. Comment about your results.

Question 3 - Revisit the Question 3 in Assignment 1, you toss a bent coin N times, obtaining a sequence of heads and tails. The coin has an unknown bias f of coming up heads.

We assume the prior for f is a beta distribution (Mackay section 23.5 or Bishop 2.1.1), Beta(α, β). The probability density function of the beta distribution is given by the following:

P(f|α, β) = (fα-1(1-f)β-1)/B(α, β)

Where the term in the denominator, B(α, β) is present to act as a normalising constant so that the area under the PDF actually sums to 1.

(a) Show that the posterior distribution of f, P(f|nH), is also a beta distribution. Show and justify all working.

(b) We carried N = 50 tosses and observed nH = 12 heads. Plot the prior Beta(12, 12) and the resulting posterior distribution about P(f|nH) on the same figure.

(c) Implement a Markov chain using the Metropolis method given in the lectures to simulate from the posterior distribution. Label your script file my_metropolis.m. Then compare the results from a closed-form solution in (b) and one calculated by numerical approximation. Plot the analytic and MCMC-sampled posterior distributions about f, overlaid with the prior belief.

Note - Use MATLAB to solve the questions for plotting.

Verified Expert

Using matlab to solve the different data points. First the equation was replicated in mmatlab with different variables and data points from 0 – 100. Using the same the first was plotted and the results displayed. On similar lines the part b was done and all the results displayed on a single graph. Using the same given parameters and values were estimated and completed. Using a mixture of 2 equations the system was tested by carefully following the steps and results displayed. Using the given equation the number of coins were counted and results confirmed

Reference no: EM132357814

Questions Cloud

Locate your organizations financial information : Analyze the relationship between your profit and loss statement and the rate of sales over the past twelve months, and make two observations about the relations
Determine the economic order quantity : a. Determine the economic order quantity. b. What is the average number of bags on hand?
Demonstrate connection to your current work environment : Demonstrate a connection to your current work environment. If you are not employed, demonstrate a connection to your desired work environment.
Describe the behavior of people in the organization : Do managers and employees use certain words and phrases to describe the behavior of people in the organization?
Implement the EM algorithm for synthetic data set : COSC380/580 Algorithms in Machine Learning Assignment, University of New England, Australia. Implement the EM algorithm for synthetic data set
What output does the large intermittent process : A) At what output does the large intermittent process become cheaper than the small one? B) At what output does the repetitive process become cheaper
European strategic research road map to ict enabled energy : What are the five ICT enablers of energy efficiency identified by European strategic research Road map to ICT enabled Energy-Efficiency in Buildings
What are the most effective and ineffective ways : In your opinion, what are the most effective and ineffective ways for managers to motivate employees? Provide reasons to support your answer.
What can investors learn from interpreting results of ratio : Select a company that trades common stock on the NYSE. Please identify and describe information that is included in the stock trading reports for that stock.

Reviews

len2357814

8/14/2019 3:02:14 AM

Use MATLAB to solve the questions for plotting. This assignment covers Module 2 and Module 3: including the expectation-maximization (EM) algorithm, the maximum likelihood method, as well as Monte Carlo methods. Please ensure you are familiar with that material, and work through all of the Labs for Module 2 and Module 3 before attempting this assignment. Presentation (5 marks): Be sure to present your results clearly and informatively per the Assignment for-matting directions on the Moodle site. Include relevant Matlab code and output where appropriate.

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd