Apriori sequence analysis is a technique that looks out for the statistically significant patterns in the sequence of the data. It is widely used in shopping use cases—we can predict what will be the likeliest next purchase on knowing the purchase of an item by a customer.
We can implement the Apriori sequence algorithm in R using the cspade
function. In the following code, we filter the rules with support
more than 0.55
alone:
seq_rules<- cspade(zaki, parameter = list(support = 0.55), control = list(verbose=TRUE))
The output is as follows:
The preceding output will generate the rules based on the parameters specified. To learn about using other parameters, refer to the documentation of the packages at https://cran.r-project.org/web/packages/arulesSequences/arulesSequences.pdf.