Altair RISE
A program to recognize and reward our most engaged community members
Nominate Yourself Now!
Home
Discussions
Community Q&A
Replace missing values with random values?
tek
Hi there,
is it possible to replace missing values in nominal attributes with random values?
I have a nominal ID (every feature has its own value, like a name), but some of them are missing. If I replace the missing values with average, min or max values, it would destroy the uniqueness of each feature. Can I tell RM to replace each of the missing values by a different value?
Thanks for the help!
Find more posts tagged with
AI Studio
Accepted answers
All comments
Marco_Boeck
Hi,
yes this is possible in the latest version of RapidMiner. You can add a "Generate Attributes" operator to your process and then click on edit list, and add.
attribute name: choose the exact attribute name that contains missing values
function expressions: if(missing(YOUR_ATTRIBUTE_NAME), round(rand()*YOUR_DESIRED_NUMBER), YOUR_ATTRIBUTE_NAME)
this will replace all missing values with a random value in the range of your choice.
Regards,
Marco
tek
Hey there!
This solution actually does not work. The problem is, it replaces missing values with random values of a range of that attribute. But I would like to replace missing values with random values that do not occour in the other values of this attribute. This is important because this attribute will become the ID, later in the process.
So the replaced values have to be: not included in this attribute beforehand, may not repeat themselfes, should be random (so in case the count of missing values increases from one execution to another).
I hope this specifies the problem a little better. : )
Best regards!
Marco_Boeck
Hi,
I'm afraid in that case you will have no choice but to use the Execute Script operator and write your own code.
Regards,
Marco
Quick Links
All Categories
Recent Discussions
Activity
Unanswered
日本語 (Japanese)
한국어(Korean)
Groups