Chestii de Fotbal
Chestii de Fotbal

Reputation: 133

Replace values in range Rapidminer

I am using Rapidminer Studio 6 and I want to replace values in dataset (or results, or series), lets say we have an attribute with values between 1 and 10, so I want to apply an operator which will replace values 1 to 4 and 8 to 10 by 0 so the new values will be 0's and numbers from 4 to 8. Say we have 2 4 1 5 7 9 -op-> 0 4 0 5 7 0. Can someone tell me which operator to use, or subprocess?

Upvotes: 0

Views: 1021

Answers (1)

Andrew Chisholm
Andrew Chisholm

Reputation: 6567

(copied from original answer)

You can use the Generate Attributes operator for this with if in the parameters section.

If your attribute is called a2 and you want to change it to zero if its value is below 3 and above 5, the parameters to the Generate Attributes operator would look like this.

attribute name: a2

function expressions: if(a2<3,0,if(a2>5,0,a2))

Upvotes: 2

Related Questions