This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
cs401r_w2016:lab4 [2016/01/02 23:26] admin |
cs401r_w2016:lab4 [2021/06/30 23:42] (current) |
||
---|---|---|---|
Line 15: | Line 15: | ||
{{:cs401r_w2016:lab4_noisy.png?nolink|}} | {{:cs401r_w2016:lab4_noisy.png?nolink|}} | ||
+ | |||
+ | |||
+ | ---- | ||
+ | ====Grading standards:==== | ||
+ | |||
+ | |||
+ | Your notebook will be graded on the following: | ||
+ | |||
+ | * 20% Correct implementation of three kernels | ||
+ | * 30% Correct implementation of noiseless GPR | ||
+ | * 30% Correct implementation of noisy GPR | ||
+ | * 20% Six tidy and legible plots, with appropriate ranges | ||
---- | ---- | ||
Line 26: | Line 38: | ||
</code> | </code> | ||
- | You must perform Gaussian process regression on this dataset, and produce visualizations for both noiseless and noise-free observations. Your notebook should produce one visualization for each of the following kernel types: | + | You must perform Gaussian process regression on this dataset, and produce visualizations for both noiseless and noisy observations. Your notebook should produce one visualization for each of the following kernel types: |
* The linear kernel (MLAPP 14.2.4) | * The linear kernel (MLAPP 14.2.4) | ||
Line 34: | Line 46: | ||
Therefore, your notebook should produce **six** different visualizations: two for each kernel type. | Therefore, your notebook should produce **six** different visualizations: two for each kernel type. | ||
- | For the noisy observation case, use \sigma_n^2=0.1 | + | For the noisy observation case, use \sigma_n^2=0.1. |
+ | |||
+ | For the polynomial kernel use a degree of 3. | ||
+ | |||
+ | For the Gaussian / RBF kernel, set all parameters to 1.0 | ||
+ | |||
+ | The mean function for this lab should always return 0. | ||
You should also answer the following questions: | You should also answer the following questions: | ||
Line 42: | Line 60: | ||
Your visualizations should be done on the range ''[-2 10]'' of the x-axis. | Your visualizations should be done on the range ''[-2 10]'' of the x-axis. | ||
+ | |||
+ | For the errorbars, you can just plot the mean +/- the variance. This isn't really a statistically meaningful quantity, but it makes the plots look nice. :) | ||
//Hint: a Gaussian process only allows you to make a prediction for a single query point. So how do you generate the smoothly varying lines in the example images?// | //Hint: a Gaussian process only allows you to make a prediction for a single query point. So how do you generate the smoothly varying lines in the example images?// | ||
Line 51: | Line 71: | ||
<code python> | <code python> | ||
+ | |||
+ | numpy.arange() | ||
plt.gca().fill_between | plt.gca().fill_between | ||
plt.scatter | plt.scatter | ||
- | numpy.linalg.inv | + | numpy.linalg.pinv |
numpy.eye | numpy.eye |