Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.

Generating an attribute if it does not already exist

PaulMPaulM Member Posts: 17 Contributor II
Either my searching skills are deficient or there isn't an obvious way of doing this... 

I am pivoting data which may not or may not generate the attributes I need depending on each example's actual data. This means that I get varying sets of attributes from the operator which is causing havoc later on in the process. I want to generate any missing attributes but I can't find an easy way to do this. 

In theory I was just going to add a Generate Attributes operator and create each one conditionally on whether it already exists. But how do I test for the existence of an attribute?

Many thanks!

Best Answer

Answers

  • MartinLiebigMartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,529 RM Data Scientist
    Hi @PaulM,
    so you have a list of all attributes which could possible exist?

    BR,
    Martin
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • PaulMPaulM Member Posts: 17 Contributor II
    Hi @mschmitz,

    Yes I do. I just came up with what felt like a very hacky way of doing this by creating an exampleset with a single example including all the attributes defaulted to zero plus a static id which I then do a join on to the master example such that any attributes in the master example are retained. 

    Feels hacky but does seem to work :smile: If there's a neater solution would love to hear it!

    Thanks,
    Paul
  • MartinLiebigMartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,529 RM Data Scientist
    Ha, thats round about what i had in mind.

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