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
Denoting missing values in expressions
tennenrishin
Member Posts: 177 Contributor II
Hi everyone.
Please bear with me if this has been asked before.
Is there a symbol or identifier that can be used to denote "missing value" in an expression.
For example, I am using the "Generate Attributes" operator, and I want the generated attribute to be missing under some conditions. For example:
if(Denominator==0,missing_value,other_expression)
I have tried "Missing", "MissingValue", "NaN", "Double.NaN' but these don't work, so I end up having to reserve a value and then follow up with the "Declare Missing" operator.
Thanks in advance
Isak
Please bear with me if this has been asked before.
Is there a symbol or identifier that can be used to denote "missing value" in an expression.
For example, I am using the "Generate Attributes" operator, and I want the generated attribute to be missing under some conditions. For example:
if(Denominator==0,missing_value,other_expression)
I have tried "Missing", "MissingValue", "NaN", "Double.NaN' but these don't work, so I end up having to reserve a value and then follow up with the "Declare Missing" operator.
Thanks in advance
Isak
0
Answers
Use the "Declare Missing Value" operator (under data transformation -> value modification).
regards
Andrew
for numerical attributes you can enter an invalid calculation so for example 0/0.
Greetings,
Sebastian
In my case I want to use filter examples (on a special attribute) with the attribute value filter. I cant seem to enter "?" in any way to select only examples where att1=?
How can this be done? ???
The way I get around it is change my attribute role to regular then filter missing attributes and then change back the role to special. This only works in my case since I only have one column with missing attributes.
There should be a missing value macro for use in filter expressions! ;D
Thanks,
-Gagi
actually this problem is detailed described in the help window: Missing values for numerical attributes are encoded by ?, for nominal by \?.
Anyway the filter examples operator is on top of our todo list for enhancements. It's quite ugly compared to the attribute selection...
Greetings,
Sebastian
Updating the filter operator would be of great help. Especially for filtering on multiple attribute values, similar to the newer list view in set role.
Thanks,
-Gagi
This seemed to work: if("%{macro}"=="?",1,2)
I guess I just assumed the macro would be treated as a character, but now I understand it just replaces the sring and makes no assumptions about type.
Hope this helps someone. ;D
-Gagi