Changing binominal attribute to numeric
Hello all,
I am wondering if there is any way in Rapidminer to change the type of an attribute from binominal/polynominal to a numeric value.
For example: if I have an attribue called Sex, taking two values: "Male" or "Female".
I want to change the type of this attriube to, let's say an integer value, taking 1 for "Male" and 2 for "Female".
** I tried using MAP operator. It changed the value; however, not the type. So, "Male" has been changed to "1" as a string, not 1 as an integer.
If all possible, how to perform such an operation in Rapidminer?
Thanks,
Best Answers
-
Thomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:1,761Unicorn
-
Telcontar120 Moderator, RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:1,635Unicorn
The operator "Nominal to Numeric" will do exactly what you are asking with the parameter option coding type set to "unique integers", but please be careful with this. For binominals it is fine, but if you map polynominal values of different categories like colors onto numbers like {1,2,3} then you are implying something about the linear relationship and distances between those categories that may not exist in real life.
2