Altair RISE
A program to recognize and reward our most engaged community members
Nominate Yourself Now!
Home
Discussions
Community Q&A
Sorting after Transpose
harris
Hello good miners.
I want to be able to sort data by column (not row) values. As I understand, I first have to use Transpose, then Sort and then Transpose again to to get back to the original data matrix with sorted values. So I need to go from this:
2,1,0
0,2,1
to this:
0,1,2
0,1,2
The three-operator sequence works in principle fine but after the first Transpose Sort only allows one special attribute (id) to be chosen. This attribute just contains the original column names which Sort then sorts alphabetically. How can I get the subsequent data rows sorted (as resultset after Transpose#1 does contain att1..att(n) values to sort by) ?
best, Harri
Find more posts tagged with
AI Studio
Accepted answers
All comments
Marco_Boeck
Hi,
in an example set, each row is linked together. So let's say you have the following example set:
att1
att2
1
a
3
c
2
b
If you sort the example set on the attribute 'att1', the result will look like this:
att1
att2
1
a
2
b
3
c
you cannot rearrange only the order of examples of a single attribute without changing the order of the other attributes. And I can't think of way right now to do what you need to do, so until someone comes up with something clever, I'm afraid you'll have to use the Execute Script operator and write your own groovy script to do it..
Regards,
Marco
Quick Links
All Categories
Recent Discussions
Activity
Unanswered
日本語 (Japanese)
한국어(Korean)
Groups