Generate binominal attribute based on comparison of two values

IgorH92IgorH92 Member Posts: 1 Newbie
edited October 2021 in Help

I'm quite new to RapidMiner, but I have an assignment from school.

I want to generate a new attribute (Difference in estimated revenue), based on a comparison of two REALs in two different attributes. If the two values are the same, the generated attribute value should be set to "true". If otherwise, the value should be "false". Below an example:

The problem you see here, is that the value "true" is often falsely assigned to the generated attribute, as you can see that the two REALs are actually the same. The value "false" was expected here.
What is going wrong? The function expression I used is: if([Estimated Annual Revenue]!=[Estimated Annual Revenue calculated], "true", "false").

Note: The attribute Estimated Annual Revenue calculated comes from an Generate Attribute with a function expression of Net Price*Estimated Annual Quantity.

Can I force the function expression to compare the values up to 3 digits after the comma? I think that there is a small difference in the values, but because the values are rounded up to 3 digits after the comma, I cannot see that.

I hope someone can help me!

Kind regards,

Igor van Haasteren

Best Answer

  • Options
    MartinLiebigMartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,517 RM Data Scientist
    Solution Accepted
    to check if thats the problem you can mouse over the 1312.800, it should show you the full string. Otherwise you can just change the number of digits in the settings.
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
Sign In or Register to comment.