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
Generate combination for all values in example
Hi!
I'm currently trying to get a list of attributes to be two-columned.
Currently, the data looks like this
synonym1;synonym2;synonym3;synonymX
tv;television;led-tv;plasma-tv;
cable;cord;energy cable
So there isn't neccesarly the same number of attributes / synonyms in each example.
What I want is:
synonym1;synonym2
tv;television
tv;led-tv
tv;plasma-tv
television;led-tv
television;plasma-tv
...
cable;cord
cord;energy cable
...
I guess it is a combination of Loops and Aggregations.
Can anyone please help me?
Thank you very much in advance!
I'm currently trying to get a list of attributes to be two-columned.
Currently, the data looks like this
synonym1;synonym2;synonym3;synonymX
tv;television;led-tv;plasma-tv;
cable;cord;energy cable
So there isn't neccesarly the same number of attributes / synonyms in each example.
What I want is:
synonym1;synonym2
tv;television
tv;led-tv
tv;plasma-tv
television;led-tv
television;plasma-tv
...
cable;cord
cord;energy cable
...
I guess it is a combination of Loops and Aggregations.
Can anyone please help me?
Thank you very much in advance!
0
Best Answer
-
MartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
Hey onlin360,
can i assume that tv is always in the first attribute for all tv synomyms?
If yes, you can do loop values, transpose, cartesian product and filter out the duplicates - i think.
~Martin
- Sr. Director Data Solutions, Altair RapidMiner -
Dortmund, Germany0
Answers
Hi Martin!
Well there is always a word in the first attribute, but there are about 950 rows.
And each of them is a different pair of synonyms, so not always "tv".
Regards,
Steven
Hi,
have a look at the attached process. That should work.
~Martin
Dortmund, Germany
@BalazsBarany educated me that there is a way easier way to this using De-Pivot. Attached is a process demonstrating it.
~Martin
Dortmund, Germany
If you have your data in the described format (value;value1;value2 etc.), the easiest way to get Martin's data structure is with the Split operator.