This task involves building several predictive models of daily sales at the cafe, using the data that you constructed last week. (If you did not do your homework last week, then please feel free to copy one of your colleagues’ code for the data construction).
Your task:
invoices.csv
data.features
that will help you predict the sales for the next day. These could include the day, the last day’s sales, the same day last week’s sales, the weather, etc. At a bare minimum, try using day-of-the-week dummy variables and a time trend.lm()
, regularised linear models using glmnet()
, regression trees using rpart()
and random forests using randomForest()
. If you’re feeling keen, you can try to use some others!Note that the task will be easier if you don’t include any features that are constructed from historical sales (as then your forecasts will have to be “rolling”). However, your model probably won’t work as well…