Calcuulate variance for sub-groups

noah977
noah977 New Altair Community Member
edited November 5 in Community Q&A
Hello,

I am attempting to calculate variance withing subgroups of results.

The concept is simple.  In my training set, I have groups of tests.  For example
Group - score
1            22
1            23
1            21
1            25
2            44
2            43
2            50
etc..     


I want to calculate the variance for EACH GROUP.


I CAN easily create subgroups by using the following:

<operator name="AttributeSubsetPreprocessing (2)" class="AttributeSubsetPreprocessing" expanded="no">
              <parameter key="attribute_name_regex"    value="group"/>
</operator>
What I want to do is add AN attribute for variance for each of the subgroup.  I tried using the AttributeAggregation operator, but it doesn't work.

I tried using an ExampleSetTranspose as Ingo suggested in an earlier post, but this doesn't work.  When I add the variance attribute to the group, RM responds with an error informing me that the subgroup number of attributes can't be changed.


Can someone help me figure out how to do this?

Thanks!!
Tagged:

Answers

  • TobiasMalbrecht
    TobiasMalbrecht New Altair Community Member
    Hello Noah,

    try aggregating the values within the group by using an [tt]Aggregation[/tt] operator and joining the resulting example sets using the group as id.

    Regards,
    Tobias