For some problems you may want to take a traditional regression or classification based approach while still accounting for the date/time-sensitive components of your data. In this post I will use the
tidymodelssuite of packages to:
– build lag based and non-lag based features
– set-up appropriate time series cross-validation windows
– evaluate performance of linear regression and random forest models on a regression problem
For my example I will use data from Wake County food inspections. I will try to predict the
SCOREfor upcoming restaurant food inspections.
Click through to see it in action.