🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

transaction data to binary incidence matrix

User: "mariolito"
New Altair Community Member
Updated by Jocelyn
Hi all,

I am quite new user at Rapidminer and I want to transform transaction data to a binary incidence matrix.
Let me assume the intial transaction data is:

A B C
1 1 1
1 2 1
2 1 1
2 2 1
2 3 1
3 1 1
3 3 1

Where A stands for the customer id - B for the product id - C for the number of products purchased
Thus, the transformation that I would like to do would be as:

A C_1.0 C_2.0 C_3.0
1 1         1         0
2 1         1         1
3 1         0      1

In order to do so I perform the following process with the following operators:

1. Read Excel  (where I choose A and B to be polynomial variables and C integer)
2. Pivot            (where I choose - group attribute : A - index attribute : B - weight aggregation: sum )

However this results to the following

Row No.   A   C
1               1   1
2               2   1
3               3   1

I guess that my mistake is something quite simple, but I ve been struggling a lot.    :-\
Please let me know if you have any comments.

Thanks,

Marios

Find more posts tagged with

Sort by:
1 - 1 of 11
    User: "JEdward"
    New Altair Community Member
    Uncheck the box "skip constant attributes" that will resolve it.