Processing math: 100%

Assignment 5

Exercise 1 (10 points)

Suppose we fit a curve with basis functions b1(X)=X, B2(X)=(X1)2I(X1). Note that I(X1) equals 1 for X1 and 0 otherwise. We fit the linear regression model

Y=β0+β1b1(X)+β2b2(X)+ε

and obtain the coefficient estimates ˆβ0=1, ˆβ1=1, ˆβ2=2. Sketch the estimated curve between X=2 and X=2. Note the intercepts, slopes and other relevant information.

Exercise 2 (10 points)

Suppose we fit a curve with basis functions b1(X)=I(0X2)(X1)I(1X2), B2(X)=(X3)I(3X4)+I(4<X5). We fit the linear regression model

Y=β0+β1b1(X)+β2b2(X)+ε

and obtain the coefficient estimates ˆβ0=1, ˆβ1=1, ˆβ2=3. Sketch the estimated curve between X=2 and X=2. Note the intercepts, slopes and other relevant information.

Exercise 3 (10 points)

Explain what happens to the bias/variance trade-off of our model estimates use regression splines.

Exercise 4 (10 points)

Draw an example (of your own invention) of a partition of two-dimensional feature space that could result from recursive binary splitting. Your example should contain at least six regions. Draw a decision tree corresponding to this partition. Be sure to label all aspects of your figures, including regions R1,R2,..., the cut points t1,t2,..., and so forth.

Exercise 5 (10 points)

Provide a detailed explanation of the algorithm that is used to fit a regression tree.

Exercise 6 (10 points)

Explain the difference between bagging, boosting, and random forests.

Exercise 7 (20 points)

You will be using the Boston data found here. The response is medv and the remaining variables are predictors.

Do test-training split as usual, and fit a random forest model or boosted tree (your choice) and a linear regression model.

The random forest or boosted tree model has a selection of hyper-parameters that you can tune to improve performance. Perform hyperparameter tuning using k-fold cross-validation to find a model with good predictive power. How does this model compare to the linear regression model?

Footnotes