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
[SOLVED] Selecting attribute subset specified in a "meta" exampleset
tennenrishin
Member Posts: 177 Contributor II
in Help
Hi
Suppose we have examplesetA with a (design-time-unknown) set of attributes:
E.g.
a b c d e <-- attributes
1 2 3 4 5 <-- example 1
1 2 3 4 5 <-- example 2
We also have examplesetB holding (design-time-unknown) examples:
E.g.
X <-- attribute
a <-- example 1
d <-- example 2
e <-- example 3
The output that is needed is
a d e
1 4 5
1 4 5
The examplesetB specifies how we want to select attributes in examplesetA.
What is the best way to do this in RM?
(
Should I create a regex by looping over the examples in B?
Should I select the attributes one at a time by looping over the examples in B, and join them all together in that loop?
Is there another simpler way that I'm not thinking about?
)
Thanks for any help.
Suppose we have examplesetA with a (design-time-unknown) set of attributes:
E.g.
a b c d e <-- attributes
1 2 3 4 5 <-- example 1
1 2 3 4 5 <-- example 2
We also have examplesetB holding (design-time-unknown) examples:
E.g.
X <-- attribute
a <-- example 1
d <-- example 2
e <-- example 3
The output that is needed is
a d e
1 4 5
1 4 5
The examplesetB specifies how we want to select attributes in examplesetA.
What is the best way to do this in RM?
(
Should I create a regex by looping over the examples in B?
Should I select the attributes one at a time by looping over the examples in B, and join them all together in that loop?
Is there another simpler way that I'm not thinking about?
)
Thanks for any help.
0
Answers
I often go for the first approach of creating a regex from the second example set.
But if your actual data does not contain missings, you could also define attribute X in Example Set B as Id, transpose it, remove all attributes (with Filter Example Range), use the Union operator to combine it with examplesetA and then remove all attributes which contain missing values via Filter Attributes.
Good luck!
~Marius
Thanks!
So this is what I ended up with Can you elaborate a bit more on this part:
Some kind of operator that can do attribute set intersections could be handy sometimes, maybe.