[SOLVED] ML-Homework 5 Gaussian Process

50.99 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

Rate this product

In this section, you are going to implement the Gaussian Process and visualize the result.

● Training data o input.data is a 34×2 matrix. Every row corresponds to a 2D data point

(Xi,Yi).

o Yi = f(Xi) + 𝜖i  is a noisy observation, where 𝜖i ~   N(∙|0, β-1). You can use β = 5 in this implementation.

● What you are going to do o Part1: Apply Gaussian Process Regression to predict the distribution of f and visualize the result. Please use a rational quadratic kernel to compute similarities between different points.

Details of the visualization:

–   Show all training data points.

–   Draw a line to represent the mean of f in range [-60,60].

–   Mark the 95% confidence interval of f.

(You can use matplotlib.pyplot to visualize the result, e.g. use matplotlib.pyplot.fill_between to mark the 95% confidence interval, or you can use any other package you like.)

o Part2: Optimize the kernel parameters by minimizing negative marginal log-likelihood, and visualize the result again. (You can use scipy.optimize.minimize to optimize the parameters.)

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.