Exercise

Building a workflow

With your data ready for analysis, you will declare a logistic_model() to predict whether or not they will arrive late.

You assign the role of "ID" to the flight variable to keep it as a reference for analysis and debugging. From the date variable, you will create new features to explicitly model the effect of holidays and represent factors as dummy variables.

Bundling your model and recipe() together using workflow()will help ensure that subsequent fittings or predictions will implement consistent feature engineering steps.

Instructions

100 XP
  • Assign an "ID" role to flight.
  • Bundle the model and the recipe into a workflow object.
  • Fit lr_workflow to the test data.
  • Tidy the fitted workflow.