Question: 2. In this problem, we will investigate a simple case of bias due to underfitting. Suppose that training data {(xi, yi)is modeled using a simple

2. In this problem, we will investigate a simple case of bias due to underfitting. Suppose that training data {(xi, yi)is modeled using a simple linear model of the form But suppose that the true relationship between x and y is noiseless and quadratic, i.e., y = f(x), f(x) = 00 + 01x + 02z? for some true parameters Bo (B00, 01, Po2) (a) Describe how to compute the least-squares fit of the model parameters (30, 1) from n. The procedure will involve multiple steps, and you do not need to simplify the equations. Just clearly state how one would compute Pis the training data (xi,yi), i from the training data. (b) Using the fact that yi = f(a) for the training data {(xi,Vi)}N1, write an expression for As in terms of the training features {xi}~1 and the true parameter values A-Again, you do not need to simplify the equations. Just clearly state how As relates to and (c) Suppose that the true parameters are 0 (1,2,-1) and the model is trained using 10 values xi that are linearly spaced in the closed interval [O, 1]. Write a short Python pro- gram to compute the least-squares parameters Bis. Plot the estimated function f(x;Bis) and the true function f(x) for x E [0,3 (d) At which of value x , 31 does bias2(z-V-y)2-f(x; As)-f(z))2 grow largest? 2. In this problem, we will investigate a simple case of bias due to underfitting. Suppose that training data {(xi, yi)is modeled using a simple linear model of the form But suppose that the true relationship between x and y is noiseless and quadratic, i.e., y = f(x), f(x) = 00 + 01x + 02z? for some true parameters Bo (B00, 01, Po2) (a) Describe how to compute the least-squares fit of the model parameters (30, 1) from n. The procedure will involve multiple steps, and you do not need to simplify the equations. Just clearly state how one would compute Pis the training data (xi,yi), i from the training data. (b) Using the fact that yi = f(a) for the training data {(xi,Vi)}N1, write an expression for As in terms of the training features {xi}~1 and the true parameter values A-Again, you do not need to simplify the equations. Just clearly state how As relates to and (c) Suppose that the true parameters are 0 (1,2,-1) and the model is trained using 10 values xi that are linearly spaced in the closed interval [O, 1]. Write a short Python pro- gram to compute the least-squares parameters Bis. Plot the estimated function f(x;Bis) and the true function f(x) for x E [0,3 (d) At which of value x , 31 does bias2(z-V-y)2-f(x; As)-f(z))2 grow largest
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
