TransactionBuilder: A function to create sequences ID according to the delay...

Description Usage Arguments Value

Description

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.

Usage

1
2
TransactionBuilder(df, ID, event, time, timeFormat, timeMax = "",
  timeMin = 0, timeUnit = "secs", parallel = F)

Arguments

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.

Value

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


MGousseff/r2spmf documentation built on May 26, 2019, 11:58 p.m.