transaction data, can not aggregate binominal values
Hello all,
I have a dataset that looks like:
User | Item
-------------
1 | Cheese
1 | Bread
2 | Milk
I'd like to mine the frequent item sets from this data. First thing I did was feed this to "Nominal to Binomial" which seems to work as expected, eg:
User | Cheese | Bread | Milk
--------------------------------------------------
1 | true | false | false
1 | false | true | false
2 | false | false | true
What I now need to do is aggregate by user ID to generate:
User | Cheese | Bread | Milk
--------------------------------------------------
1 | true | true | false
2 | false | false | true
I thought I could do this with the Aggregate operator, but that operator seems completely blind to the binomial columns; I can't find any way of selecting them.
What should I be doing here?
Thank you!
Answers
Hi. I would Pivot by User ID. You can choose which attributes to aggregate. Put the User ID in the "Group By" section.
Scott
Hi Caceter,
You can use the 0/1 to represent the false/true values and aggregate by user ID.
Here is the sample process. There are many ways to solve your problem. If you prefer 'Aggregation' here is some example
HTH,
YY
Two years later and I have exactly the same problem as OP and yyhuang's answer solves it perfectly (I took inspiration from your example 1). Thank you both!