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

generate a new (complex) Attribute

SimonW18272SimonW18272 Member Posts: 13 Learner I
Hey everyone,

I want to get a new attribute which is quiet complicated (atleast I think its the case)

I got the follwoing table with the data set in black and I want to get a new variable which indicates if the last case (look at date) with the same ID was a yes or no.

Imagine the data would be if a person (ID) came to the doctors appionted was noted. Now I want to generate an attribute if the person (ID) came to the last  appointment (before this one)or not. How can I enable this in Rapidminer because its quiet complex for me. Hope you get my question with the example


Answers

  • MartinLiebigMartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
    Hi,
    seems like you can first use lag and then something like:
    if(date_before(Date-1,Date),"Yes,"No")
    with generate attributes
    or so?

    Best,
    Martin
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Simple lag won't be enough if multiple patients are in the data. The right approach would be "Loop values" on the ID (or better a nominal copy of it for Loop Values), inside the loop filtering for the current ID, and doing the lag there. 
  • MartinLiebigMartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
    Oh, true.
    I usually recommend to use Group Into Collection + Loop Collection over Loop Values for this though.

    BR,
    Martin
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
Sign In or Register to comment.