Question: Question 2 : [ 1 2 . 5 Points ] Python Exercise on Gaussian Process Regression ( GPR ) for posterior prediction. Generate 1 0

Question 2 : [12.5 Points] Python Exercise on Gaussian Process Regression (GPR) for posterior prediction.
Generate 10 data points (these points will serve as training data points) with negligible noise (corresponds to noiseless GP regression). Use the following python function with default noise variance.
import numpy as np
def generate_noisy_points(n=10, noise_variance=1e-6):
,np.random.seed(777)
,x= np.random.uniform(-3.,3.,(n,1))
,y=np*sin(x)+np*random*randn(n,1)** noise_variance ?****0.5
,return x,y
Write Python script for the following questions :
a)[1.5 Points] Plot the variation of x wrt y
b)[4 Points] Generate 100 test data points and Draw 10 function samples from the GP prior distribution. Show the mathematical representation of GP prior distribution.
c)[7 Points] Compute and Plot the GP posterior distribution given the original (training)10 data points. Use the RBF kernel function. Please also show the mathematical representation of posterior distribution.
Question 2 : [ 1 2 . 5 Points ] Python Exercise

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!