Comparison in two columns and "Filter Examples"

EsiKEsiK Member Posts: 1 Newbie
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: 521 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 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.