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.

convert values

bookitsabookitsa Member Posts: 15 Contributor I
Hello! I have a dataset where the content  of an attribute has only 2 values: 2 and 4. I want to convert these 2 values in yes and no. Note that this attribute has the role label as well.Thank you for your help!

Best Answer

Answers

  • tftemmetftemme Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, RMResearcher, Member Posts: 164 RM Research
    Hi @bookitsa,

    You can also use the Generate Attribute operator. For the attribute name you choose the old attribute name (it will be overwritten with the new values. For the function expression, you use:

    if ([attribute name] == 2, "yes", "no")

    Of course you have to replace [attribute name] with your own attribute name (and maybe change "yes" and "no" if the 4 should be converted to a "yes"

    Best regards,
    Fabian

  • Telcontar120Telcontar120 RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,635 Unicorn
    You can also use the Nominal to BInominal Operator if you are trying to make it specifically a binominal type attribute (which is often the case for labels).
    Brian T.
    Lindon Ventures 
    Data Science Consulting from Certified RapidMiner Experts
  • bookitsabookitsa Member Posts: 15 Contributor I
    edited January 2019
    Thank you all for your responses! The one that solved my problem was from @varunm1! Thank you again all of you!!
Sign In or Register to comment.