Loop Examples
Synopsis
This Operator executes a subprocess once for each of the Examples in an ExampleSet.
Description
If there are N Examples in the ExampleSet, the loop is executed N times. The index of the current iteration is provided by the macro named in iteration macro. See the Extract Macro operator for more details about macros.
Whereas other loop operators, such as Loop or Loop Attributes, include an option called "reuse results" that determines whether the result of one iteration is reused in the next, Loop Examples uses a different mechanism.
- If the result of the Loop Examples inner subprocess is sent to the exa port, the result is reused in the next iteration.
- If the result of the Loop Examples inner subprocess is sent to the out port, the result is NOT reused. Each iteration of the loop will then create its own independent result.
For details, see the second Tutorial Process.
Differentiation
Loop
Much like a conventional programming loop, the Loop Operator iterates a user-specified number of times.
Loop Values
The Loop Values Operator iterates once for each of the possible values of a selected Attribute.
Input
example set
This input port expects an ExampleSet.
Output
example set
If the exa port of the inner subprocess is not connected, then the original ExampleSet is delivered. Otherwise, if the inner subprocess is connected to the exa port, this port delivers the final result, after all the iterations have been completed.
output
The Loop Examples operator can have multiple output ports. When one output is connected, another output port becomes available which is ready to deliver another output (if any). The order of outputs remains the same. The Object delivered at the first output port of the subprocess is delivered at the first output of the outer process. Don't forget to connect all outputs in correct order. Make sure that you have connected the right number of ports at all levels of the chain.
Parameters
Iteration macro
The index of the current iteration is provided by the macro named in iteration macro.