How to make numerical attributes nominal again?

eldenoso
eldenoso New Altair Community Member
edited November 2024 in Community Q&A

Hello altogether,

due to the application of the K-Means-Operator I had to change the nominal attributes to numerical. The format I am confronted with now is similar to: 

                 attribute1 = xxx, attribute 1= yyy, attribute 2= zzz, attribute 2 = www

Cluster 1              1                        0                        0                          1
Cluster 2              0                        1                        0                          1
Cluster 1              1                        0                        1                          0

Is there another way to get the attributes back into one column each? Instead of the binary form.

Thank you :)

Philipp 

Answers

  • sgenzer
    sgenzer
    Altair Employee

    Hi @eldenoso - looks like you used the "dummy coded" option when you went from nominal to numerical in order to have all numerical attributes for k-means?

    If it were me, I would use the Generate Attributes operator with an expression like this: if(attribute1=="xxx","xxx","yyy") for attribute1, and very similar for attribute2.  Then use Select Attributes to remove the dummy coded attributes.

     

    Scott

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.