Generate binominal attribute based on comparison of two values

IgorH92
IgorH92 New Altair Community Member
edited November 5 in Community Q&A
Hello,

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

  • MartinLiebig
    MartinLiebig
    Altair Employee
    Answer ✓
    Hi,
    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.
    ~Martin

Answers

  • MartinLiebig
    MartinLiebig
    Altair Employee
    Answer ✓
    Hi,
    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.
    ~Martin