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.
Consistent loop behaviour when iterating zero times
tennenrishin
Member Posts: 177 Contributor II
The following process generates an error when it runs, simply because the number of loop iterations happens to be zero. But if any other number of attributes matched, there would not have been an error.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>Certain loop operators (e.g. Loop Attributes) can be considered a repetitive chain of their contents. Extrapolating this principle down to zero iterations, the consistent behavior would be that the loop operator has no effect (rather than generating an error).
<process version="5.2.006">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.2.006" expanded="true" name="Process">
<process expanded="true" height="486" width="907">
<operator activated="true" class="generate_data" compatibility="5.2.006" expanded="true" height="60" name="Generate Data" width="90" x="112" y="75"/>
<operator activated="true" class="loop_attributes" compatibility="5.2.006" expanded="true" height="60" name="Loop Attributes" width="90" x="313" y="75">
<parameter key="attribute_filter_type" value="regular_expression"/>
<parameter key="regular_expression" value="regexThatMayMatchZeroAttributes"/>
<process expanded="true" height="486" width="907">
<connect from_port="example set" to_port="example set"/>
<portSpacing port="source_example set" spacing="0"/>
<portSpacing port="sink_example set" 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>
0
Answers