The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Parse Nominal ERROR
agurruchaga
Member Posts: 11 Contributor I
Hello!
I am trying to parse a nominal attribute to numerical, but it seems like there is some format issue. When I use "Nominal to Numerical" Operator, I get one new column for each value of the attribute i am trying to parse.
If I use "Parse Numbers" Operator, It shows me the error "The setup does not seem to contain any obvious errors, but you should check the log messages or activate the debug mode in the settings dialog in order to get more information about this problem"
Any ideas?
Thanks in advance.
Tagged:
0
Answers
I forgot to mention, my nominal attribute contains numbers and the separator is a comma. I specify this in the operator.
hello @agurruchaga welcome to the community! I'd recommend posting your XML process here (see https://youtu.be/KkgB5QXWXJ8 and "Read Before Posting" on right when you reply) and attach your dataset. This way we can replicate what you're doing and help you better.
Scott
Hi @agurruchaga,
I will try to provide an answer element :
"When I use "Nominal to Numerical" Operator, I get one new column for each value of the attribute i am trying to parse"
It seems that you have set, in the "Nominal to Numerical" Operator, the parameter coding type as dummy coding, and in this case,
this is what is expected.
You can instead set coding type as unique integers. In this case, your attribute values will be remplaced by numeric values.
For example, consider that you have an attribute called Color which has as possible values : Red 12, Blue 24 and Green 35.
After transformation by the "Nominal to Numerical", your attribute values will be : 0, 1 and 2.
Is it what you are looking for ?
Regards,
Lionel
Thanks both. I now see I should not use nominal to numerical, it isn't what I am looking for. The problem is "Parse Number" is throwing the exception I mentioned in my last post. I attach the process xml :
The column "EaF1" contains numbers with a comma as decimal character, ie : 238,60
Thanks.
OK, it seems parse numbers operator doesn't accept blank values. I created another attribute, converting blanks to 0 and it works now(although it isn't the nicest solution IMO). Thanks for your answers.
Hi @agurruchaga,
For handling those blanks the parameter "unparsable value handling" is available. Assuming those blank cells represent missing entries you could set this parameter value to "replace with missing values". Within further processing you could apply the Operator Replace missing values to handle these.
Sidenote:
Depending on the source of your data sometimes there might be leading or trailing blanks in those cells. Those can be removed using the Operator Trim.
Best regards,
Edin