So far, we generated various rules based on the transactions and events as well as the co-occurrence of various events. Now, we will consider the data along with the sequence in which the events happen. Sequence analysis is very popular to predict the occurrence of an event through a pattern from the historic data.
In order to understand sequence analysis, we will consider a sequential dataset. The zaki
dataset contains sequential data that comes along with the arulesSequences
package. We use the summary
function to get the details of the sequential dataset. For better understanding, we convert the dataset into a data frame:
library(arulesSequences) data(zaki) summary(zaki)
The output of the preceding command is as follows:
Let us have a look into the data using the following command:
as(zaki, "data.frame")
The output of the preceding command is as follows:
This data frame conveys lots of information in a very friendly way for easy understanding. The transactionID.size
parameter...