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]How to iterate over Attributes
Hello RM-Team,
I tried to iterate over the attributes with the "loop attributes"-operator, but the "select attributes"-operator seems not to work well within a loop
It only work's on the first cycle, thats why I think its not my fault. Could you tell me if this is a bug, and maybe when you will fix it?
Best xDSticker
I tried to iterate over the attributes with the "loop attributes"-operator, but the "select attributes"-operator seems not to work well within a loop
It only work's on the first cycle, thats why I think its not my fault. Could you tell me if this is a bug, and maybe when you will fix it?
<?xml version="1.0" encoding="UTF-8" standalone="no"?>Put a breakpoint on the SAtt-operator and see the difference between the output at the first cycle and the other one's.
<process version="5.3.008">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.3.008" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="generate_data" compatibility="5.3.008" expanded="true" height="60" name="Generate Data" width="90" x="179" y="30">
<parameter key="number_examples" value="10"/>
</operator>
<operator activated="true" class="loop_attributes" compatibility="5.3.008" expanded="true" height="76" name="Loop Attributes" width="90" x="313" y="30">
<process expanded="true">
<operator activated="true" breakpoints="after" class="select_attributes" compatibility="5.3.008" expanded="true" height="76" name="Select Attributes" width="90" x="112" y="30">
<parameter key="attribute_filter_type" value="single"/>
<parameter key="attribute" value="%{loop_attribute}"/>
</operator>
<connect from_port="example set" to_op="Select Attributes" to_port="example set input"/>
<connect from_op="Select Attributes" from_port="example set output" to_port="example set"/>
<portSpacing port="source_example set" spacing="0"/>
<portSpacing port="sink_example set" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
</process>
</operator>
<connect from_op="Generate Data" from_port="output" to_op="Loop Attributes" to_port="example set"/>
<connect from_op="Loop Attributes" from_port="example set" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>
Best xDSticker
0
Answers
Connect the output of the Select Attribute operator to the RES output.
Matthew
Because of this "chaining" your process amounts to selecting att1 from {att1,att2,att3,att4,att5} and then selecting att2 from {att1}, which is why it doesn't work.
You could usually just use the macro to work directly on the full exampleset without first selecting. But if you really want to select each attribute into a different exampleset you could do it like this