Description Usage Arguments Value
Input is a data frame and affects a sequence ID to the events related to an ID, built on the time elapsed between an event and thi previous event.
1 2 | TransactionBuilder(df, ID, event, time, timeFormat, timeMax = "",
timeMin = 0, timeUnit = "secs", parallel = F)
|
df |
is a dataframe |
ID |
is the ID, for instance of a customer. Within this ID the function will create one or several sequences, according to time between events. |
time |
is the time of the event |
timeFormat |
is the format in which the time is encoded |
timeMax |
if the time elapsed between two events is more than timeMax, a new sequence is started |
timeMin |
if the time elapsed between two events is less than timeMin, these events are considered to happen together : they belong to the same itemset |
parallel |
if True the function will use the several cores available to split the building of the sequence. It appears to be useful above 1 million of lines, depending, of course, of the specs of the computer. |
a dataframe with three columns. sequence contains all the frequent sequences. support is the number of times this sequence occurs, and frequence is support divided by the total number of sequences
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.