I'm using the below codes to create association rules for a project;
RawData_Kicks_Rules <- apriori(RawData_Kicks_ALLKICKS, parameter = list(supp = 0.005, conf = 0.5, minlen=3, maxlen=9))
RawData_Limiter <- which(colSums(is.subset(RawData_Kicks_Rules,RawData_Kicks_Rules))>1)
RawData_Kicks_Rules.sub <-RawData_Kicks_Rules[-RawData_Limiter]
The goal from the last two lines of code is to identify and remove any rules that are a part of a larger existing rule. For example;
{Disposal Source=Free Kick,Kick Target=Open,Direction=Sideward} => {Kick Distance=0-20}
{Disposal Source=Free Kick,Kick Target=Open,Direction=Sideward,Disposal Pressure=None} => {Kick Distance=0-20}
In this output, ideally the first rule would have been removed since it is already a part of the the second rule.
Any help on this would be appreciated.