1. Learn
  2. /
  3. Courses
  4. /
  5. Machine Learning in the Tidyverse

Exercise

Evaluate model performance

Now that you have both the actual and predicted values of each fold you can compare them to measure performance.

For this regression model, you will measure the Mean Absolute Error (MAE) between these two vectors. This value tells you the average difference between the actual and predicted values.

Instructions

100 XP
  • Calculate the MAE by comparing the actual with the predicted values for the validate data and assign it to the validate_mae column.
  • Print the validate_mae column (note how they vary).
  • Calculate the mean of this column.