The RapidMiner community is on read-only mode until further notice. Technical support via cases will continue to work as is. For any urgent licensing related requests from Students/Faculty members, please use the Altair academic forum here.

💬0 Comments | 🔥0 Discussions | 👤0 Members | 🔌0 Online |

The RapidMiner community is on read-only mode until further notice. Technical support via cases will continue to work as is. For any urgent licensing related requests from Students/Faculty members, please use the Altair academic forum here.

## Answers

1,635UnicornI believe the "round" function available in generate attributes will do what you want quite easily!

You also have the 'format numbers' operator but that will turn it into a nominal value.

Lindon Ventures

Data Science Consulting from Certified RapidMiner Experts

24Contributor IHow do I insert the round in the function expression?

Tried using

Function expression

rand(round())

also two separate function expressions no luck

attribute 1 rand()

attribute 1 round()

also if maybe you know, how do I limit the random function between two numbers rand(1,5) does not work at all.

Thank you in advance.

299RM Data ScientistHi @SHSguy,

I am not sure what you want to achieve in your first use case.

If you want to round a random number the order of functions is wrong. It needs to be round(rand(),x) with x being the number of decimals to round to.

Regarding your second question:

The rand() function always delivers a floating point number between 0 and 1. So one possible solution would be

to get values between 0 and 5. If want them rounded to the next integer you would do

ceil() rounds to the next integer "above"

floow() rounds to the next integer "below"

Happy Mining,

Edin

P.S.:

An explanation to all function is given if you click on thenext to the function (see screenshot)

i24Contributor IHi Edin,

Thank you really appreciate the explanation.

Best Regards,

Nick