Session Ready
Exercise

Comparing RMSE and root-mean-squared Relative Error

In this exercise, you will show that log-transforming a monetary output before modeling improves mean relative error (but increases RMSE) compared to modeling the monetary output directly. You will compare the results of model.log from the previous exercise to a model (model.abs) that directly fits income.

The income_train and income_test datasets are loaded in your workspace, along with your model, model.log.

Also in the workspace:

  • model.abs: a model that directly fits income to the inputs using the formula

    Income2005 ~ Arith + Word + Parag + Math + AFQT

Instructions
100 XP
  • Fill in the blanks to add predictions from the models to income_test.
    • Don’t forget to take the exponent of the predictions from model.log to undo the log transform!
  • Fill in the blanks to gather() the predictions and calculate the residuals and relative error.
  • Fill in the blanks to calculate the RMSE and relative RMSE for predictions.
    • Which model has larger absolute error? Larger relative error?