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

Trimming attributes inside LoopValue?

sgtrocksgtrock Member Posts: 17 Contributor II
edited November 2018 in Help
Hello, all;

I thought this was going to be a straightforward exercise, but it's not working out too well. :-)  I've got a substantial dataset that I need to carve up based upon the values in three attributes.  Once I have the separate collections, I need to add additional data rows in each collection.  This data is based upon a template that needs to be inserted after every row in each collection.

So, what I did was the following:
LoopValue 1
    Filter on attribute 1
    LoopValue 2
        Filter on attribute 2
        LoopValue 3
            Filter on attribute 3
When I do this, I get the expected result;  collections broken down by category, subcategory, and sub-subcategory.  At this point, I need to get rid of the extraneous attributes before adding in the the templates. 

I tried adding a Trim statement inside LoopValue 3.  I trimmed by subset and chose the attributes that I wanted to get rid of.  Reviewing the example set at the input and output of the Trim statement shows that it is not taking effect.  Is this happening because I'm trying to execute inside a loop?

Answers

  • MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869 Unicorn
    Hi,

    the Trim operator should work inside a loop, however you won't get rid of any attributes with it. If you want to remove attributes, you have to use Select Attributes.

    Best,
    Marius
  • sgtrocksgtrock Member Posts: 17 Contributor II
    Sorry, I should have realized that my description needed a little more context.  I defined the Trim operator this way:

    1)  Selected Subset
    2) Opened the Select Attributes... dialog and chose the three attributes that I needed to remove.


    That should have given me every attribute except those three, correct?  Yet the output of the Trim operator remains the same as the input.
  • MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869 Unicorn
    No, you have to use the operator "Select Attributes". The Trim operator removes leading and trailing whitespace from nominal attributes, and the selected attributes in its parameters define on which parameters the trimming is applied.
  • sgtrocksgtrock Member Posts: 17 Contributor II
    :o  D'oh!  I knew that.  :D
Sign In or Register to comment.