Question: (a) Say you are given two datapoints (7,31) = (2,7) and (x2, 32) = (3,11). You wish to fit a polynomial model to this

(a) Say you are given two datapoints (7.31) = (2,7) and (x2, 32)=(3,11). You wish to fit a polynomial model (d) Say I have a dataset with p= 3. After using the analytic solution for linear regression I come up with

(a) Say you are given two datapoints (7,31) = (2,7) and (x2, 32) = (3,11). You wish to fit a polynomial model to this dataset. What is the optimal degree 0 polynomial fit to this data? Show all work. Hint: what is w for a degree 0 model? (b) In the previous question, which degree would cause the cost function to be zero? Provide this model (i.e. compute the weight vector) using any method you like.. (c) For simple linear regression (i.e. p= 1), what does w represent? How does our estimate of w change as the variance of X increases? To illustrate your answer above, draw two datasets (scatter plots) on the axes below: one where the variance of X is low and one where it is high. Sketch the line of best fit for each. Var(X): low YA Var(X): high (d) Say I have a dataset with p= 3. After using the analytic solution for linear regression I come up with this linear model: hu(x)= 72 +0.01z - 15.6x2 - 7.5x3 Assuming the features are roughly on the same scale, which feature is the most important for predicting the outcome? Which feature is least relevant to the outcome? (e) The graph below shows an elbow plot for a series of polynomial models, with degree on the x-axis and RSS for a training dataset on the y-axis. Which polynomial model would you choose as the "best" model and why? RSS 0 1 4 5 6 7 polynomial degree 8 9 10 (f) Building on the previous question, say you were given a test dataset, and computed predic- tions for this test dataset using each polynomial model (deg 0-10). Sketch roughly what you would expect the RSS for this test dataset to look like (on the axes above). Hint: which degree would cause the minimum test error?

Step by Step Solution

3.38 Rating (157 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a The optimal degree 0 polynomial fit ... View full answer

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!