Exercise

Back to regression with stacking

In Chapter 1, we treated the app ratings as a regression problem, predicting the rating on the interval from 1 to 5. So far in this chapter, we have dealt with it as a classification problem, rounding the rating to the nearest integer. To practice using the StackingRegressor, we'll go back to the regression approach. As usual, the input features have been standardized for you with a StandardScaler().

The MAE (mean absolute error) is the evaluation metric. In Chapter 1, the MAE was around 0.61. Let's see if the stacking ensemble method can reduce that error.

Instructions

100 XP
  • Instantiate a decision tree regressor with: min_samples_leaf = 11 and min_samples_split = 33.
  • Instantiate the default linear regression.
  • Instantiate a Ridge regression model with random_state = 500.
  • Build and fit a StackingRegressor, passing the regressors and the meta_regressor.