unfold option in Loop Collection / Collect operator

User: "sgenzer"
Altair Employee
Updated by Jocelyn
hi...discovered the interesting "unfold" option today in my RapidMiner journey and was quite happy to find it.  If I understand it properly, it has the ability to union a collection of example sets with one operator (in the same way that the Append operator does if the number&type of attributes are identical)?  Two questions: 1) why on earth is it called "unfold"?  I've been searching for this ability for a long, long time (and been creating daisy chains of Union operators during this time).  Why not call it "union"? 2) how can I get it to work?  in the input, I put multiple example sets and then, if I check "unfold", I would expect one big union example set coming out.  But it does not work.  Help?

Here I generate three example sets, collect them, and then try to "unfold" them using Collect:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="6.5.002">
 <context>
   <input/>
   <output/>
   <macros/>
 </context>
 <operator activated="true" class="process" compatibility="6.5.002" expanded="true" name="Process">
   <process expanded="true">
     <operator activated="true" class="generate_data" compatibility="6.5.002" expanded="true" height="60" name="Generate Data" width="90" x="45" y="120">
       <parameter key="attributes_lower_bound" value="0.0"/>
     </operator>
     <operator activated="true" class="generate_data" compatibility="6.5.002" expanded="true" height="60" name="Generate Data (2)" width="90" x="45" y="210">
       <parameter key="number_of_attributes" value="3"/>
       <parameter key="attributes_lower_bound" value="0.0"/>
     </operator>
     <operator activated="true" class="generate_data" compatibility="6.5.002" expanded="true" height="60" name="Generate Data (3)" width="90" x="45" y="300">
       <parameter key="number_of_attributes" value="8"/>
       <parameter key="attributes_lower_bound" value="0.0"/>
     </operator>
     <operator activated="true" class="collect" compatibility="6.5.002" expanded="true" height="112" name="Collect" width="90" x="246" y="165"/>
     <operator activated="true" class="collect" compatibility="6.5.002" expanded="true" height="76" name="Collect (2)" width="90" x="380" y="165">
       <parameter key="unfold" value="true"/>
     </operator>
     <connect from_op="Generate Data" from_port="output" to_op="Collect" to_port="input 1"/>
     <connect from_op="Generate Data (2)" from_port="output" to_op="Collect" to_port="input 2"/>
     <connect from_op="Generate Data (3)" from_port="output" to_op="Collect" to_port="input 3"/>
     <connect from_op="Collect" from_port="collection" to_op="Collect (2)" to_port="input 1"/>
     <connect from_op="Collect (2)" from_port="collection" 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>
Here I do the same thing with Loop Collection:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="6.5.002">
 <context>
   <input/>
   <output/>
   <macros/>
 </context>
 <operator activated="true" class="process" compatibility="6.5.002" expanded="true" name="Process">
   <process expanded="true">
     <operator activated="true" class="generate_data" compatibility="6.5.002" expanded="true" height="60" name="Generate Data" width="90" x="45" y="120">
       <parameter key="attributes_lower_bound" value="0.0"/>
     </operator>
     <operator activated="true" class="generate_data" compatibility="6.5.002" expanded="true" height="60" name="Generate Data (2)" width="90" x="45" y="210">
       <parameter key="number_of_attributes" value="3"/>
       <parameter key="attributes_lower_bound" value="0.0"/>
     </operator>
     <operator activated="true" class="generate_data" compatibility="6.5.002" expanded="true" height="60" name="Generate Data (3)" width="90" x="45" y="300">
       <parameter key="number_of_attributes" value="8"/>
       <parameter key="attributes_lower_bound" value="0.0"/>
     </operator>
     <operator activated="true" class="collect" compatibility="6.5.002" expanded="true" height="112" name="Collect" width="90" x="246" y="165"/>
     <operator activated="true" class="loop_collection" compatibility="6.5.002" expanded="true" height="76" name="Loop Collection" width="90" x="380" y="165">
       <parameter key="unfold" value="true"/>
       <process expanded="true">
         <connect from_port="single" to_port="output 1"/>
         <portSpacing port="source_single" spacing="0"/>
         <portSpacing port="sink_output 1" spacing="0"/>
         <portSpacing port="sink_output 2" spacing="0"/>
       </process>
     </operator>
     <connect from_op="Generate Data" from_port="output" to_op="Collect" to_port="input 1"/>
     <connect from_op="Generate Data (2)" from_port="output" to_op="Collect" to_port="input 2"/>
     <connect from_op="Generate Data (3)" from_port="output" to_op="Collect" to_port="input 3"/>
     <connect from_op="Collect" from_port="collection" to_op="Loop Collection" to_port="collection"/>
     <connect from_op="Loop Collection" 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>
I must be missing something very simple?  Thanks.

Scott

Find more posts tagged with