The Altair Community is migrating to a new platform to provide a better experience for you. The RapidMiner Community will merge with the Altair Community at the same time. In preparation for the migration, both communities are on read-only mode from July 15th - July 24th, 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.

Iteration over a dataset to find a follower ID

analystanalyst Member Posts: 1 Contributor I
edited November 2018 in Help
Hi all,

I hope you can help me with a hopefully basic question.

I have a dataset with the attributes ID and Timestamp. I would like to set a new attribute with the direct follower of an example. Please compare the example below.

I tried with loops, but could not find out how to do it.

Thank you for any hints.

ID     |     Timestamp     |     Follower ID
1     |     01.01.2014 15:34     |    
2     |     02.01.2014 15:34     |     1
3     |     03.01.2014 15:34     |     2
4     |     04.01.2014 15:34     |     3
5     |     05.01.2014 15:34     |     4
6     |     06.01.2014 15:34     |     5
7     |     07.01.2014 15:34     |     6
8     |     08.01.2014 15:34     |     7


  • Options
    awchisholmawchisholm RapidMiner Certified Expert, Member Posts: 458 Unicorn

    You could try modifying the process shown here


  • Options
    bkrieverbkriever RapidMiner Certified Analyst, Member Posts: 11 Contributor II
    If the ID is generated in your process (so it will always be 1, 2, 3 etc.) with no filters being used between the step where the ID is created and when you want to generate the follower ID you could just use the Generate Attributes operator and make attribute name "FollowerID" and function expression "ID-1" (with no quotes).
Sign In or Register to comment.