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

bitmask operations?

harri678harri678 Member Posts: 34 Contributor II
edited November 2018 in Help
Hi.

is there any way to use some kind of bitmask operations in the "generate attributes" operator? I have an integer with bits 2^0-4 used for bit information andI want to generate binominal attributes based on one bit's value...

Greetings,
Harald

Answers

  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi Harald,
    although there aren't any bit mask operations available directly, you can use the modulo operator for simulating them. To test if the first bit is set, just use the modulo 2 operation for the higher bit n use this forumlar:

    (x % 2^(n+1) - x % 2^n) / 2^n

    Greetings,
      Sebastian
  • harri678harri678 Member Posts: 34 Contributor II
    thanks!
Sign In or Register to comment.