🥳 RAPIDMINER 9.9 IS OUT!!! 🥳

The updates in 9.9 power advanced use cases and offer productivity enhancements for users who prefer to code.

CLICK HERE TO DOWNLOAD

Add up a group_index for each ID in Dataset

daniel_foersterdaniel_foerster Member Posts: 5 Contributor I
edited December 2018 in Help

Given following example set:

id;group_index

1

1

1

1

1

2

2

2

2

2

3

3

3

3

3

3

 

and i want the group index to be filled like:

id;group_index

1;1

1;2

1;3

1;4

1;5

2;1

2;2

2;3

2;4

3;1

3;2

3;3

3;4

 

How an i manage this? i tried loop values in combination with generate attributes but it's setting 1 for each ID or count up in one row.

 

 

Thank you!

Answers

  • mschmitzmschmitz Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 2,937  RM Data Scientist

    Hi,

     

    Group Into Collection + Loop Collection with Generate ID inside is at least one way of doing it.

     

    BR,

    Martin

    - Head of Data Science Services at RapidMiner -
    Dortmund, Germany
  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 612   Unicorn

    Hi,

     

    you could check out this project:

    https://github.com/bbarany/rapidminer-windowfunctions

     

    Your request is an application of window functions, available in relational databases. The project mentioned there implements these in RapidMiner. You can use this process, group by the id and use the row_number() function to get exactly the result you want.

     

    Regards,

    Balázs

  • hyukiehyukie Member Posts: 2 Contributor I
    @mschmitz how i can group into collection and make loop collection
    can u explain step by step
  • yyhuangyyhuang Administrator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 332  RM Data Scientist
Sign In or Register to comment.