Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.
[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.