In addition to mining interesting associations within the transaction database, we can mine interesting sequential patterns using transactions with temporal information. In the following recipe, we will demonstrate how to create transactions with temporal information.
In this recipe, we will generate transactions with temporal information. We can use the generated transactions as the input source for frequent sequential pattern mining.
Perform the following steps to create transactions with temporal information:
- First, you need to install and load the
arulesSequences
package:
> install.packages("arulesSequences")> library(arulesSequences)
- You can first create a list with purchasing records:
> tmp_data=list(c("A"), + c("A","B","C"), + c("A","C"), + c("D"), + c("C","F"), + c("A","D"), + c("C"), ...