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

Comparison in two columns and "Filter Examples"

EsiKEsiK Member Posts: 1 Learner I
edited October 2023 in Help
I recently started studying Rapidminer and can't figure out how to compare two columns in a csv table. I have a 'grade a' and 'grade b' column. After the calculation, I need to filter the data by the rule: 'grade a'>'grade b'. How to do it as in the screenshot? Because if I do as a screenshot I get an error.

Best Answers

  • ceaperezceaperez Member Posts: 541 Unicorn
    Solution Accepted
    Hi @EsiK

    A possible solution is using the Generate attribute operator, with a conditional rule -> if(grade_a>grade_b,1,0), and then filtering using the Filter Examples operator. 

    Please find attached a simple example with golf dataset

    Best, 

    César
  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Solution Accepted
    Hi!

    You can simplify "if(grade_a > grade_b, 1, 0)" to just "grade_a > grade_b". This will return a boolean ("binominal") with the possible values true and false.

    Regards,
    Balázs
Sign In or Register to comment.