Machine Learning Homework 5 – 1 Solution

$30.00 $24.00

Gaussian Process Gaussian Process In this section, you are going to implement the Gaussian Process and visualize the result. ● Training data input.data is a 34×2 matrix. Every row corresponds to a 2D data point (Xi,Yi). Yi = f(Xi) + i is a noisy observation, where i ~ N(∙|0, β-1). You can use β =…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Description

5/5 – (2 votes)

Gaussian Process

  1. Gaussian Process

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

Training data

  1. input.data is a 34×2 matrix. Every row corresponds to a 2D data point

(Xi,Yi).

    1. 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

    1. 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.)

  1. 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.)

  1. Report

    • Submit a report in pdf format. The report should be written in English.

    • Report format:

      • 1. code with detailed explanations (20%)

        • For example, show the formula of rational quadratic kernel and the process you optimize the kernel parameters

        • Note that if you don’t explain your code, you cannot get any points in section 2 and 3 either.

          • Part1 (10%)

          • Part2 (10%)

      • 2. experiments settings and results (20%)

        • Show the figures and the hyperparameters we asked you to show

        • Note that if you don’t explain your code in the above section, you cannot get any points in this section either.

          • Part1 (10%)

          • Part2 (10%)

      • 3. observations and discussion (10%)

        • Anything you want to discuss, such as comparing the performance when using different hyperparameters.

  1. Turn in

    1. Report (.pdf)

    1. Source code

You should zip source code and report in one file and name it like ML_HW5-1_yourstudentID_name.zip, e.g. ML_HW5-1_0856XXX_王小明.zip.

P.S. If the zip file name has format error or the report is not in pdf format, there will be a penalty (-10). Please submit your homework before the deadline, late submission is not allowed.

  • Packages allowed in this assignment:

You are only allowed to use numpy, scipy.optimize, scipy.spatial.distance, and package for visualizing results. Official introductions can be found online.

Important: scikit-learn is not allowed.

Machine Learning Homework 5 – 1 Solution
$30.00 $24.00