A have a data frame with shops with a number of independent variables (all categorical), I'm trying to find a decent model to predict a dependent variable that is ordered and categorical (ie volume of foot traffic: "low", "medium", "high"). The dependent variable is defined for about 20% of the observations, and I want to predict for the missing 80%.
What models/techniques would you suggest?
For now, I started by learning some association rules with
arules (manual here):
require(arules) train # my data frame with the complete observations target_field = 'foot.traffic' # filter rules to observe only the relevant ones appearance_list = list(rhs=paste0(target_field,"=", unique(train[,target_field]))) rules <- arules::apriori(train, parameter = list( support=0.1, confidence=0.2 ), appearance = appearance_list) rules <- sort(rules, by="lift") inspect(rules)
Now I can inspect these rules, and they generally make sense. They mostly refer to
high cases, indicating that rules for
medium are harder to identify.
How can I apply them back to the training set to see how well they predict the
foot.traffic variable? Is there a good off-the-shelf strategy to apply the rules?