🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Getting the name of minimum-value attribute

User: "Shubha"
New Altair Community Member
Updated by Jocelyn
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:
<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,&quot;%{loop}&quot;,1)"/>
            </list>
        </operator>
    </operator>
</operator>

Find more posts tagged with