"Loop until the exampleset is empty."
Hi,
I'm trying to find the operator/s that I could use to execute a subprocess repeatedly until a certain exampleset is empty. I have a feeling that it should be the 'Loop Until'. However, it requires a performance input which I don't have. I also searched the forum but couldn't find any answer.
Any idea?
thanks.
I'm trying to find the operator/s that I could use to execute a subprocess repeatedly until a certain exampleset is empty. I have a feeling that it should be the 'Loop Until'. However, it requires a performance input which I don't have. I also searched the forum but couldn't find any answer.
Any idea?
thanks.
Find more posts tagged with
Sort by:
1 - 4 of
41
I think you can do it with "Loop" and macros, like this....
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.1.001">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.1.001" expanded="true" name="Root">
<process expanded="true" height="379" width="705">
<operator activated="true" class="retrieve" compatibility="5.1.001" expanded="true" height="60" name="Retrieve" width="90" x="45" y="30">
<parameter key="repository_entry" value="//Samples/data/Iris"/>
</operator>
<operator activated="true" class="extract_macro" compatibility="5.1.001" expanded="true" height="60" name="Extract Macro" width="90" x="186" y="19">
<parameter key="macro" value="Count"/>
</operator>
<operator activated="true" class="loop" compatibility="5.1.001" expanded="true" height="76" name="Loop" width="90" x="313" y="30">
<parameter key="iterations" value="%{Count}"/>
<process expanded="true" height="357" width="872">
<operator activated="true" class="filter_example_range" compatibility="5.1.001" expanded="true" height="76" name="Filter Example Range" width="90" x="112" y="30">
<parameter key="first_example" value="%{a}"/>
<parameter key="last_example" value="%{Count}"/>
</operator>
<operator activated="true" class="extract_macro" compatibility="5.1.001" expanded="true" height="60" name="Extract Macro (2)" width="90" x="246" y="30">
<parameter key="macro" value="Sub_Count"/>
</operator>
<operator activated="true" class="provide_macro_as_log_value" compatibility="5.1.001" expanded="true" height="76" name="Provide Macro as Log Value" width="90" x="380" y="30">
<parameter key="macro_name" value="Sub_Count"/>
</operator>
<operator activated="true" class="log" compatibility="5.1.001" expanded="true" height="76" name="Log" width="90" x="581" y="30">
<list key="log">
<parameter key="Filter" value="operator.Provide Macro as Log Value.value.macro_value"/>
</list>
</operator>
<connect from_port="input 1" to_op="Filter Example Range" to_port="example set input"/>
<connect from_op="Filter Example Range" from_port="example set output" to_op="Extract Macro (2)" to_port="example set"/>
<connect from_op="Extract Macro (2)" from_port="example set" to_op="Provide Macro as Log Value" to_port="through 1"/>
<connect from_op="Provide Macro as Log Value" from_port="through 1" to_op="Log" to_port="through 1"/>
<connect from_op="Log" from_port="through 1" to_port="output 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="source_input 2" spacing="0"/>
<portSpacing port="sink_output 1" spacing="0"/>
<portSpacing port="sink_output 2" spacing="0"/>
</process>
</operator>
<connect from_op="Retrieve" from_port="output" to_op="Extract Macro" to_port="example set"/>
<connect from_op="Extract Macro" from_port="example set" to_op="Loop" to_port="input 1"/>
<connect from_op="Loop" from_port="output 1" 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>
Hi Haddock,
Thanks for the reply. However, what I want is a little different. I want to perform the loop while a certain exampleset inside that loop is not empty. That means the loop stops when that exampleset is empty. It doesn't need the count of the exampleset. It looks to me that the operator Loop Until will do the trick. It checks an exampleset inside for criteria. But it also needs a performance input which is giving me an error (or bug).
thanks again.
Thanks for the reply. However, what I want is a little different. I want to perform the loop while a certain exampleset inside that loop is not empty. That means the loop stops when that exampleset is empty. It doesn't need the count of the exampleset. It looks to me that the operator Loop Until will do the trick. It checks an exampleset inside for criteria. But it also needs a performance input which is giving me an error (or bug).
thanks again.
Hi,
you could use the "Extract Performance" Operator to extract a performance vector from your example set's properties.
Even if you don't need it in the end, you can deliver this dummy performance object to the port to satisfy it's condition.
But I guess you can use it to extract the number of examples as performance and use the conditions of Loop Until to abort if no examples are left.
Greetings,
Sebastian
you could use the "Extract Performance" Operator to extract a performance vector from your example set's properties.
Even if you don't need it in the end, you can deliver this dummy performance object to the port to satisfy it's condition.
But I guess you can use it to extract the number of examples as performance and use the conditions of Loop Until to abort if no examples are left.
Greetings,
Sebastian
Here's a test process to illustrate my objective. It uses the Loop Until operator. However, it doesn't work. There's the error that there's no data delivered to the port Loop Until.performance. Is the Loop Until operator the right choice for this?
thanks.