Loop Labels (AI Studio Core)
Synopsis
This operator iterates over its subprocess for each attribute with label role in the input ExampleSet.Description
The Loop Labels operator is a nested operator i.e. it has a subprocess. The subprocess of the Loop Labels operator executes n number of times, where n is the number of attributes with label role in the given ExampleSet. The result of this operator is a collection of objects. Please study the attached Example Process for better understanding.
For compatibility with older versions this operator also accepts roles that start with 'label' als label roles. So, if an ExampleSet has attributes with the roles 'label', 'label2' and 'label3', for example, then the subprocess of this operator will execute three times on it.
Input
- example set (Data table)
This input port expects an ExampleSet.
Output
- out (Collection)
This operator can have multiple out output ports. When one output is connected, another out 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 out port of subprocess is delivered at the first out output port of the outer process. Do not 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.
Tutorial Processes
Introduction to the Loop Labels operator
The 'Golf' data set is loaded using the Retrieve operator. A breakpoint is inserted here so that you can have a look at the ExampleSet. You can see that the ExampleSet has an attribute with label role i.e. the 'Play' attribute. The Set Role operator is applied on this ExampleSet to change the roles of the 'Wind' and 'Outlook' attributes also to 'label'. A breakpoint is inserted here so that you can have a look at the ExampleSet before application of the Loop Labels operator. The Loop Labels operator is applied on the ExampleSet. There are three attributes with label roles. Therefore, the subprocess of the Loop Labels operator will be executed three times; once for each label attribute. The results of each iteration will be merged into a collection which will be delivered as the result of this operator.
Inside the subprocess of the Loop Labels operator a Decision Tree operator with default parameters is applied. Each iteration generates a Decision Tree for the current label. These trees are returned in form of a collection by the Loop Labels operator. The resultant collection can be seen in the Results Workspace.