Description
1. Generate the data set D as follows:
a. πΏπΏ = 100
b. ππ = 25
c. ππ contains samples from a uniform distribution U(0,1).
d. π‘π‘ = sin(2ππππ) + ππ, where ππ contains samples from a Gaussian distribution
N(0, ππ =0.3).
2. Select a set of permissible values for the regularization parameter ππ.
3. For each value of ππ, use the method of βlinear regression with non-linear modelsβ
to fit Gaussian basis functions to each of the datasets. Use π π = 0.1.
4. Produce the plot as shown below, where
ππ(Μ
π₯π₯) = 1
πΏπΏοΏ½ππ(ππ)
(π₯π₯)
πΏπΏ
ππ=1
(ππππππππ)2 = 1
ππ οΏ½οΏ½ππΜ
οΏ½π₯π₯(ππ)
οΏ½ β βοΏ½π₯π₯(ππ)
οΏ½οΏ½
2
ππ
ππ=1
π£π£π£π£π£π£π£π£π£π£π£π£π£π£π£π£ = 1
ππ οΏ½1
πΏπΏοΏ½οΏ½ππ(ππ)
οΏ½π₯π₯(ππ)
οΏ½ β ππΜ
οΏ½π₯π₯(ππ)
οΏ½οΏ½
2
πΏπΏ
ππ=1
ππ
ππ=1
5. The test error curve is the average error for a test data set of 1000 points.
Upload your .m or .py file to Blackboard prior to the deadline.
Name your files as Lastname_Firstname_Project3.*