Closed isaac2lord closed 7 years ago
Have a look at the following man page ? transactions
. The last example shows exactly how to create transactions for data that looks like yours. The cid
will be automatically added as the transactionID
. To also add the timestamp to the itemset info, you can use the methods itemsetInfo
after you have created the transaction object. However, you can only have a timestamp per transaction and your data has multiple event dates for each customer. Maybe it is useful to use the timestamp for the earliest or latest transaction (depending on the goal of your analysis).
Am sorry I am new to
arules
package and this is not actually an issue but rather a question. I already posted this question on stackoverflow but wanted to ask it here hoping to get an answer quick.I have a data set with customer ID, event_date, and event_type looking like this:
and wanted to analyze frequent pattern of events. Q is how I build a
transaction
class that could potentially include customer id and time stamp in its @itemsetInfo?Thnx