Options

transaction data to binary incidence matrix

mariolitomariolito Member Posts: 1 Contributor I
edited November 2018 in Help
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

Answers

  • Options
    JEdwardJEdward RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 578 Unicorn
    Uncheck the box "skip constant attributes" that will resolve it. 

Sign In or Register to comment.