RapidMiner 9.7 is Now Available

Lots of amazing new improvements including true version control! Learn more about what's new here.


Calcuulate variance for sub-groups

noah977noah977 Member Posts: 32  Guru
edited November 2018 in Help

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

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"/>
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?



  • TobiasMalbrechtTobiasMalbrecht Moderator, Employee, Member Posts: 290  RM Product Management
    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.

Sign In or Register to comment.