Comparison in two columns and "Filter Examples"
EsiK
New Altair Community Member
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:
0
Best Answers
-
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ésar1 -
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ázs1
Answers
-
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ésar1 -
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ázs1