Comparison in two columns and "Filter Examples"

EsiK
EsiK New Altair Community Member
edited November 5 in Community Q&A
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.

Tagged:

Best Answers

  • Caperez
    Caperez Altair Community Member
    Answer ✓
    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
  • BalazsBarany
    BalazsBarany New Altair Community Member
    Answer ✓
    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

Answers

  • Caperez
    Caperez Altair Community Member
    Answer ✓
    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
  • BalazsBarany
    BalazsBarany New Altair Community Member
    Answer ✓
    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