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
Getting the name of minimum-value attribute
Hi,
Suppose I have an exampleset with five attributes att1, att2,....att5. Now, I want to create a new attribute "Group", which contains the attribute names, corresponding to the minimum of the values of att1,...att5.
Example:
att1 att2 att3 att4 att5 Group
1 3 4 -4 2 att4
31 0 1 2 8 att2
-10 4 1 12 5 att1
How do we do this? Or instead of "Group", even just the numbers would also be fine. Like instead of att4, att2,att1 in the above, if one get 4,2,1 that should also be fine.
I have here with attached a code:
Suppose I have an exampleset with five attributes att1, att2,....att5. Now, I want to create a new attribute "Group", which contains the attribute names, corresponding to the minimum of the values of att1,...att5.
Example:
att1 att2 att3 att4 att5 Group
1 3 4 -4 2 att4
31 0 1 2 8 att2
-10 4 1 12 5 att1
How do we do this? Or instead of "Group", even just the numbers would also be fine. Like instead of att4, att2,att1 in the above, if one get 4,2,1 that should also be fine.
I have here with attached a code:
<operator name="Root" class="Process" expanded="yes">
<operator name="ExampleSetGenerator" class="ExampleSetGenerator">
<parameter key="target_function" value="random"/>
<parameter key="number_examples" value="10"/>
</operator>
<operator name="AttributeAggregation" class="AttributeAggregation">
<parameter key="attribute_name" value="m"/>
<parameter key="aggregation_attributes" value="att.*"/>
<parameter key="aggregation_function" value="minimum"/>
</operator>
<operator name="FeatureIterator" class="FeatureIterator" activated="no" expanded="yes">
<parameter key="filter" value="att.*"/>
<parameter key="iteration_macro" value="loop"/>
<parameter key="work_on_input" value="false"/>
<operator name="AttributeConstruction" class="AttributeConstruction">
<list key="function_descriptions">
<parameter key="P" value="if(%{loop} == m,"%{loop}",1)"/>
</list>
</operator>
</operator>
</operator>
0
Answers