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

Splitting based on the values in an attribute

sectynsectyn Member Posts: 25 Maven
I have a set of rows with missing values in one attribute. I would like to split the data based on the attribute with missing values in such a way that the sets will have rows upto the row which has some value in that attribute.
 
For example if the example set is:

Att1   Att2    Att3

a      test1   
b      test2   
c      test3    val3
d      test4
e      test5
f      test6
g      test7    val7
h      test8
i        test9

So after the split, I want 2 sets:

a     test1   
b     test2  
c      test3    val3

d     test4
e     test5
f      test6
g     test7    val7

Tried this in Loop Values, but not sure how to do the split.




Best Answer

  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Solution Accepted
    Hi @jennyclub,

    this kind of row-spanning processing is quite hard in RapidMiner.

    I would try something like this:
    1. Get the the index of non-empty Att3 values. E. g. Generate ID, Filter Examples. 
    2. Loop the filtered index values (they need to be converted into nominal) and filter the other rows based ID <= current index. 
    3. Extract the current Att3 value with Extract Macro and write it into the filtered table with Generate Attributes.

    I hope this gives you an idea.

    Regards,

    Balázs

Answers

  • sectynsectyn Member Posts: 25 Maven
    Thank you, Balázs. This really helped.
Sign In or Register to comment.