convert each nominal value of data set to a unique number
Hi,
I’m using neural networks and my data is like below :
attr1 attr2 attr3 attr4
Summer , 2 , true , good
winter , 10 , false , good
spring , 4 , true , bad
since neural networks use numerical data , I need to map each nominal value to a number. When I use nominal2numeric operator , it gives me the below result :
attr1=summer attr1=winter attr1=spring attr3=true attr3=false attr4=good attr4=bad attr2
1 0 0 1 0 1 0 2
0 1 0 0 1 1 0 10
0 0 1 1 0 0 1 4
But I need to assign exactly one number(not separated digit) to each nominal value.for example replece “summer” with “100” , “winter” with “010” and so on )
I mean something like the below :
attr1 attr2 attr3 attr4
100 , 2 , 10 , 10
010 , 10 , 01 , 10
001 , 4 , 10 , 01
Is there any solution to do this in rapidminer ?
your help are appreciated.