The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

limit an attribute value to a specified maximum

bibo59bibo59 Member Posts: 2 Contributor I
edited November 2018 in Help

Hello,
how to limit an attribute (numerical) value to a specified maximum ?
If my attribute = 1.5 then my attribute = 1  
Thanks

Best Answer

  • MartinLiebigMartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
    Solution Accepted

    Hi,

     

    you can use Generate Attributes for this. Something like

     

    if(attribute=1.5,1,attribute)

     

    should do it.

     

    Best,

    Martin

    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany

Answers

  • bibo59bibo59 Member Posts: 2 Contributor I

    Thank you very much

  • Telcontar120Telcontar120 RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,635 Unicorn

    @bibo59 You might consider making your expression a bit more flexible.  Martin's solution works if the higher value is exactly 1.5, but not for other values.  So instead you could use an if statement like this: if(attribute>1,1,attribute).

    Or you could directly use the MIN function like this: min(1,attribute).

     

    Brian T.
    Lindon Ventures 
    Data Science Consulting from Certified RapidMiner Experts
Sign In or Register to comment.