Rules for converting nominal attributes to numeric?

ruser
ruser New Altair Community Member
edited November 5 in Community Q&A
There are some cases where you'll have to transform the nominal attributes to numeric values, because the algorithm works only with the numeric values. In my understanding, there are 2 possibilities:

1) If the values of the nominal attribute are relative, we can do Mapping of values.
E.g.
bad = 1
good = 2
excellent = 2.5

2) If the values of the nominal attributes are distinct and not related to each other, then we'll have to do Nominal2Binominal operation.
country
---------
US
Germany
Brazil
........

becomes

country=US    country=Germany      country=Brazil
--------------    ----------------------      ------------------
yes                          no                            no
no                            yes                          no
no                            no                            yes

Is that right?


We have to strictly follow the above rules for all the nominal attributes. If this is missed, then the Data mining results may become uninterpretable/meaningless.

Is my understanding correct? If not, please correct me where I'm wrong.
Tagged:

Answers

  • steffen
    steffen New Altair Community Member
    Hello

    Yes you are correct. Just a remark: By saying "relative" I guess you are referring to the different scales, i.e. nominal vs ordinal (see here http://en.wikipedia.org/wiki/Scale_of_measurement).

    Additionally: You have to be careful when you invent mappings for ordinal values (as in your estimation-example). Who tells you that "excellent" is not 3 ? The mapping proposed by you could lead to results, where excellent is not seperated from good any more, because it is not worth doing it (speaking in a sloppy way).
    I hope you understand.

    regards,

    Steffen