Aan de slagGa gratis aan de slag

Evaluate the xgboost bike rental model

In this exercise, you will evaluate the gradient boosting model bike_model_xgb that you fit in the last exercise, using data from the month of August. You'll compare this model's RMSE for August to the RMSE of previous models that you've built.

The dataset bikesAugust has been pre-loaded. You have already made predictions using the xgboost model; they are in the column pred.

Deze oefening maakt deel uit van de cursus

Supervised Learning in R: Regression

Cursus bekijken

Oefeninstructies

  • Fill in the blanks to calculate the RMSE of the predictions.
    • How does it compare to the RMSE from the poisson model (approx. 112.6) and the random forest model (approx. 96.7)?

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# bikesAugust is available
str(bikesAugust)

# Calculate RMSE
bikesAugust %>%
  mutate(residuals = cnt - pred) %>%
  summarize(rmse = ___(___(___)))
Code bewerken en uitvoeren