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

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, 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.