Altair RISE
A program to recognize and reward our most engaged community members
Nominate Yourself Now!
Home
Discussions
Community Q&A
"Group by Attributes" Parameter in "Aggregate" Operator is leading to some sorting problems
ella_
Hi everybody,
I was discretizing an Attribute "id_copy" so that the Attribute time has a sample rate of 1 second now.
Afterwards I used the "Aggregate" Operator for Averaging all Attributes except "id_copy" and grouping them by "id_copy".
This worked well for samling down and averaging the data but it lead to some sorting problems.
"id_copy" is sorted like 109, 11, 110, 111, 112 e.g.
The problem seems to be, that there should be some zeros as placeholders in "id_copy" and in "id" so they can be sorted like 009, 010, 011 e.g.
The "Sort" Operator for the Attribute "id_copy" in increasing direction didn´t change anything.
Can anybody help me with this issue?
Best
Ella
Find more posts tagged with
AI Studio
Accepted answers
kayman
Most likely your id treated as a nominal and not as an integer, which is probably even intended as otherwise you wouldn't be able to use 009 and so. If you need to keep this trailing zeros you could create a copy of the id column, parse this as a number and apply the sort on this attribute. This will give proper numeric sorting.
The sorting you have now is perfectly normal from 'nominal point of view'.
All comments
kayman
Most likely your id treated as a nominal and not as an integer, which is probably even intended as otherwise you wouldn't be able to use 009 and so. If you need to keep this trailing zeros you could create a copy of the id column, parse this as a number and apply the sort on this attribute. This will give proper numeric sorting.
The sorting you have now is perfectly normal from 'nominal point of view'.
ella_
@kayman
thanks for your response, problem is solved.
Yes, changing data type was a good note.
I copied the id column and used the "Nominal to Numerical" Operator for generating unique integers as id. Sorting works well now.
Best
Ella
Quick Links
All Categories
Recent Discussions
Activity
Unanswered
日本語 (Japanese)
한국어(Korean)
Groups