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
Have log file Need multiple binomial attributes
I have following example data (each record recording one group membership):
User, Group
bill, 1
bill, 2
bill, 3
mary, 1
mary, 2
ed, 3
...
From the above I need example data that indicates the events that a user has generated event at least once. For example:
User, Group_1, Group_2, Group_3,...
bill, true, true, true
mary, false, true, false
ed, false, false, true
There are about about 8000 groups (numbered 1-8000).
The purpose of analysis is to create association rules for groups that identify connections between groups. (e.g. "user being a member of group 1, is also likely to be a member of group 7)
Given the number of groups, perhaps there is a better way than the create association rules operator...
User, Group
bill, 1
bill, 2
bill, 3
mary, 1
mary, 2
ed, 3
...
From the above I need example data that indicates the events that a user has generated event at least once. For example:
User, Group_1, Group_2, Group_3,...
bill, true, true, true
mary, false, true, false
ed, false, false, true
There are about about 8000 groups (numbered 1-8000).
The purpose of analysis is to create association rules for groups that identify connections between groups. (e.g. "user being a member of group 1, is also likely to be a member of group 7)
Given the number of groups, perhaps there is a better way than the create association rules operator...
0
Answers
attached is a quick and dirty way. For sure this is a pivot-thing. Not sure if that is the easiest way to go.
~Martin
Dortmund, Germany
Unfortunately this produces the following output:
"User","Group_1.0","Group_2.0","Group_3.0","Group_4.0","Group_5.0","Group_6.0"
"bill","true","true","true","false","false","false"
"ed","false","false","false","false","false","true"
"mary","false","false","false","true","true","false"
Note the introduction of attributes Group_4.0, Group_5.0, Group_6.0? My input examples do not contain a group 4-6. Only groups 1-3. I think this is caused by use of the generated attribute as index attribute in the pivot.
I've spent some time with pivot and I can't get it to produce the output I'm looking for.
What wasn't clear from his example is that the pivot operator works by having both an attribute to group by & also several value attributes which get added up to make the total count in the grouping. (For example if someone has joined the same group several times)
Below is the corrected XML with the addition of a value_attribute set to 1. This means that for every group the person is a member has a value of 1 & when added up it becomes Bill: 0,1,1,0, etc.
I also swapped out the loop values with a numerical to binominal operator as I think that looks a little neater, both our proceses do the same at this point.
and sorry for the mistake That happens if you do such a thing in the last 3 minutes before a sales call starts.
~Martin
Dortmund, Germany