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

Add up a group_index for each ID in Dataset

daniel_foersterdaniel_foerster Member Posts: 5 Learner III
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

  • MartinLiebigMartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist

    Hi,

     

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

     

    BR,

    Martin

    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 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 Learner III
    @mschmitz how i can group into collection and make loop collection
    can u explain step by step
  • yyhuangyyhuang Administrator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 364 RM Data Scientist
Sign In or Register to comment.