Re: Convertion from nominal to numeric

Peter Reutemann <[email protected]> Fri, 6 Jan 2023 11:03:31 +1300
Newsgroups gmane.comp.ai.weka
Message-ID <CAHoQ12+HFipLxBfO2sjNmcxxVaD1SU8ZrcTwhPD02gDcgevwrg@mail.gmail.com>
> That doesn’t work either.

Works fine for me using the anneal UCI dataset.

Before:
@attribute family {'?',GB,GK,GS,TN,ZA,ZF,ZH,ZM,ZS}

Using the following filter setup:
weka.filters.unsupervised.attribute.RenameNominalValues -R 1 -N GB:11,GK:12

After:
@attribute family {'?',11,12,GS,TN,ZA,ZF,ZH,ZM,ZS}

Are there maybe spaces in your labels (leading/trailing) that could
make the matching fail?

Cheers, Peter
-- 
Peter Reutemann
Dept. of Computer Science
University of Waikato, Hamilton, NZ
Mobile +64 22 190 2375
https://www.cs.waikato.ac.nz/~fracpete/
http://www.data-mining.co.nz/
_______________________________________________
Wekalist mailing list -- [email protected]
Send posts to [email protected]
To unsubscribe send an email to [email protected]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html