The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
"Market Basket Data Format"
Hello Colleagues,
I am having a relation with TIDs, ITEM IDs.
TID ITEM
1 1
1 2
1 3
2 1
3 4
3 5
3 6
Now, I am intended to change that into Market Basket Data Format which might look like
TID ITEM
1 1 2 3
2 1
3 4 5 6
4 1 8
Is that possible to do with RapidMiner?
Could any one help me on this
Thanks
Priyan
I am having a relation with TIDs, ITEM IDs.
TID ITEM
1 1
1 2
1 3
2 1
3 4
3 5
3 6
Now, I am intended to change that into Market Basket Data Format which might look like
TID ITEM
1 1 2 3
2 1
3 4 5 6
4 1 8
Is that possible to do with RapidMiner?
Could any one help me on this
Thanks
Priyan
Tagged:
0
Answers
this is indeed possible. You should at first binarize your Item attribute using the nominal2binominal operator. You then will get a column for every possible value of item, each Line exactly containing one 1 for an item.
You then could aggregrate over the tid using the aggregation operator, building the sum over examples having the same tid. So there is finally only one row for every transaction, containing the values of sold items in the appropriate attributes.
Greetings,
Sebastian
Thanks for the Information, I tried what you explained here, but i still in error. could you suggest to improve it.
ERROR:- TID does not exists.
Thanks
Priyan
probably it's exactly what it states: TID doesn't exist. Please use a breakpoint before and check if this attribute still exists. But I assume, that it has been binomalised and hence doesn't exist anymore. You have to ensure that only ITEM is binomalised. Thatfore you have to change the role of TID into Id and ensure that ITEM is binominal.
Greetings,
Sebastian
Thanks for the Info. I changed according to your feedback though still i am in problem.
for Example2AttributePivoting :- Group Attribute & Index Attribute.
What can i do with these two attributes. Thanks
Priyan
I have no idea, what this operator does. I have never used it. But I think you will not need it in this context. The data should be in the correct format before this operator.
Greetings,
Sebastian
I am really sorry to ask again here, i got stuck with this. sorry for troubling you.
the code i used What i can use for the Group by attribute on the image i attached in the Aggregation. (image 1)
Do i need to add more than this to format the data.
i get finally this result only( image 2)
It would be a great help if you could give a feedback sir.
thanks
priyan
[attachment deleted by admin]
starting from your original post (and using the data you provided there) this is the process which performs the desired transformation from transactional data to the basket data format:
Please note that you have to adapt the input operator.
Cheers,
Ingo
Thank you very much.
I able to find the way.
thanks
Priyan