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
binomalize multiple polynominal columns together
I have many columns A1-A10 (10 in this example)
Each column got polynominal values.
I want to binomalize the columns, but not each on its own, instead i want one attribute for each value, which appears in any of these columns A1-A10?
Example:
Input:
A1 A2 A3
"green" "red" ?
"red" ? "blue"
Output:
A = green A = red A = blue
True True False
False True True
0
Answers
Use the Nominal to Numerical operator and leave the default parameter of Dummy Coding set.
hi thank but i still get
A1 = green A2 = green A1 = red A2 = red
i want to something like:
A = green A = red
I found a solution. First create an id for each example. Then do unpivot on all attributes A1-A10 into one attribute A. Then do Nom-to-Bin on A. Then do an pivot with group set to your id and index set to the index of unpivot.
I think that the combination of Nominal to Numerical and Generate Aggregation is an elegant solution.
Have a look at this process (an artificial dataset is generated using a R script):
Here are the parameters of the Generate Aggregation for a quick view:
Best,
Sebastian
Edit: Here is a version that uses Loop Values
edit: you have to do aggregation with the attribute id instead of the last pivot step and select all A rows with RegEx and set to only occuring as type