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

What should be the correct type of a nominal attribute coded 0 and 1?

CuriousCurious Member Posts: 12 Learner I
edited December 2019 in Help
If an attribute has two possible values (their 'meaning' is nominal) but they are already coded as 0 and 1, then is it OK to just set the type as integer or should I set it as binominal and then transform it back to numeric in the process?
Tagged:

Best Answer

Answers

  • rfuentealbarfuentealba RapidMiner Certified Analyst, Member, University Professor Posts: 568 Unicorn

    If their meaning is nominal and you can indistinctly set 0/1, on/off, in/out, yes/no, then these are binominals, not proper numbers (e.g. these aren't meant to be used in mathematical operations), so you might safely set these as binominals. On the other hand, if you will make use of these numbers in math operations, you would prefer to make these integers.

    Be careful, because while changing numerical to binominal converts 0's to false and 1's to true, changing binominal to numerical creates something like this instead of your original data:

    I always forget to use Parse Numbers instead, which does provide me numbers from nominal attributes. Just make sure your data does not include characters other than numeric ones.

    Hope this helps.

    Rodrigo.


  • CuriousCurious Member Posts: 12 Learner I
    Hi Rodrigo,

    Thank you so much for your answer! Just one more thing: can you specify what you exactly mean by 'mathematical operations'?

    Thank you!
  • Telcontar120Telcontar120 RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,635 Unicorn
    Don't forget you can use "Numerical to Binominal" and turn ANY numerical data into a simple binominal by setting a threshold value.  This works for attributes that are already coded as 0/1 or continuous numbers as well. It will give you a single column with values of "true" and "false" based on the threshold you define.  See the tutorial process using the Sonar data for an example.
    Brian T.
    Lindon Ventures 
    Data Science Consulting from Certified RapidMiner Experts
Sign In or Register to comment.