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
cross selling
Hai,
This is Priyan,
My .xls data looks like this
c- customer id and t- item id...
c1 t1
c1 t2
c1 t3
c1 t4
c1 t5
c2 t1
c2 t2
c3 t1
c4 t4
c5 t5
c6 t6
and i need to make it as this, using rapid miner.. ! Is any poss to do this
transaction_id t1 t2
c1 1 1
c2 1 1
c3 1 0
c4 0 1
Is any one knows it..
thanks
This is Priyan,
My .xls data looks like this
c- customer id and t- item id...
c1 t1
c1 t2
c1 t3
c1 t4
c1 t5
c2 t1
c2 t2
c3 t1
c4 t4
c5 t5
c6 t6
and i need to make it as this, using rapid miner.. ! Is any poss to do this
transaction_id t1 t2
c1 1 1
c2 1 1
c3 1 0
c4 0 1
Is any one knows it..
thanks
0
Answers
you could binarize the column with the items, convert the nominal trues into numerical 1s and then aggregate over the customer ids. Since the items seem to be different the trues should be disjoint and hence can simply be added.
Greetings,
Sebastian
[tt]<operator name="Root" class="Process" expanded="yes">
<operator name="CSVExampleSource" class="CSVExampleSource">
<parameter key="filename" value="c:\list.csv"/>
</operator>
<operator name="AttributeSubsetPreprocessing" class="AttributeSubsetPreprocessing" expanded="yes">
<parameter key="attribute_name_regex" value="item"/>
<parameter key="condition_class" value="attribute_name_filter"/>
<operator name="Nominal2Binominal" class="Nominal2Binominal">
</operator>
<operator name="Nominal2Numerical" class="Nominal2Numerical">
</operator>
</operator>
<operator name="Aggregation" class="Aggregation">
<list key="aggregation_attributes">
<parameter key="item = i1" value="sum"/>
<parameter key="item = i2" value="sum"/>
<parameter key="item = i3" value="sum"/>
<parameter key="item = i4" value="sum"/>
<parameter key="item = i5" value="sum"/>
<parameter key="item = i6" value="sum"/>
</list>
<parameter key="group_by_attributes" value="tid"/>
</operator>
</operator>
[/tt]
thats pretty correct and I didn't thought of this...Ok: Here is another way to do it Greetings,
Sebastian
Thanks for you all,
I have some doubts here,
I had a mistake initially to write the specif clearly.
cid, item both are numeric stage, - in this case , is it worth to use Nom to Binomial.
It seems diff to use the first answer because i have 1000 customers and 500 items. do any possibilities to modify this !
thanks again
Priyan
Svpriyan: If the id variable and the item variable are numeric just add a filter to convert them to nominal.
Here's the data (stored in the file list.csv):
tid item
1 1
1 2
1 3
2 1
2 4
3 5
3 4
3 6
4 1
Here's the final code as I'm implementing it to solve my question: