Hi Guys!
I hate to see a good macro thrown away, especially here in France where we eat anything, as long as it is well cooked and set of by the right wine, so let me try a different recipe!
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.2.003">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.2.003" expanded="true" name="Process">
<process expanded="true" height="615" width="1380">
<operator activated="true" class="generate_data" compatibility="5.2.003" expanded="true" height="60" name="Generate Data" width="90" x="45" y="120">
<parameter key="number_examples" value="1000000"/>
<parameter key="attributes_lower_bound" value="0.0"/>
<parameter key="attributes_upper_bound" value="100.0"/>
</operator>
<operator activated="true" class="filter_examples" compatibility="5.2.003" expanded="true" height="76" name="att1>50" width="90" x="179" y="120">
<parameter key="condition_class" value="attribute_value_filter"/>
<parameter key="parameter_string" value="att1 > 50"/>
</operator>
<operator activated="true" class="filter_examples" compatibility="5.2.003" expanded="true" height="76" name="att3>34.5" width="90" x="313" y="30">
<parameter key="condition_class" value="attribute_value_filter"/>
<parameter key="parameter_string" value="att3 >34.5"/>
</operator>
<operator activated="true" class="filter_examples" compatibility="5.2.003" expanded="true" height="76" name="!att3>34.5" width="90" x="447" y="120">
<parameter key="condition_class" value="attribute_value_filter"/>
<parameter key="parameter_string" value="att3 >34.5"/>
<parameter key="invert_filter" value="true"/>
</operator>
<operator activated="true" class="filter_examples" compatibility="5.2.003" expanded="true" height="76" name="!att1>50" width="90" x="313" y="210">
<parameter key="condition_class" value="attribute_value_filter"/>
<parameter key="parameter_string" value="att1 > 50"/>
<parameter key="invert_filter" value="true"/>
</operator>
<operator activated="true" class="filter_examples" compatibility="5.2.003" expanded="true" height="76" name="att3>34.5 (2)" width="90" x="447" y="255">
<parameter key="condition_class" value="attribute_value_filter"/>
<parameter key="parameter_string" value="att3>34.5"/>
</operator>
<operator activated="true" class="filter_examples" compatibility="5.2.003" expanded="true" height="76" name="!att3>34.5 (2)" width="90" x="581" y="300">
<parameter key="condition_class" value="attribute_value_filter"/>
<parameter key="parameter_string" value="att3>34.5"/>
<parameter key="invert_filter" value="true"/>
</operator>
<operator activated="true" class="collect" compatibility="5.2.003" expanded="true" height="130" name="Collect" width="90" x="715" y="75"/>
<operator activated="true" class="loop_collection" compatibility="5.2.003" expanded="true" height="76" name="Loop Collection" width="90" x="916" y="75">
<parameter key="unfold" value="true"/>
<process expanded="true" height="615" width="888">
<operator activated="true" class="set_macros" compatibility="5.2.003" expanded="true" height="76" name="Set Macros" width="90" x="220" y="27">
<list key="macros">
<parameter key="a1" value="if(%{a}==1||%{a}==2,20,34)"/>
<parameter key="a0" value="if(%{a}==1||%{a}==2,13,9.43)"/>
<parameter key="b1" value="if(%{a}==1||%{a}==3,34.54,66)"/>
<parameter key="b0" value="if(%{a}==1||%{a}==3,52.32,53)"/>
</list>
</operator>
<operator activated="true" class="generate_attributes" compatibility="5.2.003" expanded="true" height="76" name="Generate Attributes (2)" width="90" x="447" y="30">
<list key="function_descriptions">
<parameter key="calculated_value_1" value="%{a1} * att1 + %{a0}"/>
<parameter key="calculated_value_2" value="%{b1} * att2 + %{b0}"/>
</list>
</operator>
<connect from_port="single" to_op="Set Macros" to_port="through 1"/>
<connect from_op="Set Macros" from_port="through 1" to_op="Generate Attributes (2)" to_port="example set input"/>
<connect from_op="Generate Attributes (2)" from_port="example set output" 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>
<operator activated="true" class="append" compatibility="5.2.003" expanded="true" height="76" name="Append" width="90" x="1117" y="75"/>
<connect from_op="Generate Data" from_port="output" to_op="att1>50" to_port="example set input"/>
<connect from_op="att1>50" from_port="example set output" to_op="att3>34.5" to_port="example set input"/>
<connect from_op="att1>50" from_port="original" to_op="!att1>50" to_port="example set input"/>
<connect from_op="att3>34.5" from_port="example set output" to_op="Collect" to_port="input 1"/>
<connect from_op="att3>34.5" from_port="original" to_op="!att3>34.5" to_port="example set input"/>
<connect from_op="!att3>34.5" from_port="example set output" to_op="Collect" to_port="input 2"/>
<connect from_op="!att1>50" from_port="example set output" to_op="att3>34.5 (2)" to_port="example set input"/>
<connect from_op="att3>34.5 (2)" from_port="example set output" to_op="Collect" to_port="input 3"/>
<connect from_op="att3>34.5 (2)" from_port="original" to_op="!att3>34.5 (2)" to_port="example set input"/>
<connect from_op="!att3>34.5 (2)" from_port="example set output" to_op="Collect" to_port="input 4"/>
<connect from_op="Collect" from_port="collection" to_op="Loop Collection" to_port="collection"/>
<connect from_op="Loop Collection" from_port="output 1" to_op="Append" to_port="example set 1"/>
<connect from_op="Append" from_port="merged 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>
It's quite similar to Josh's original, but it doesn't use copies; it makes four bags into which the examples are apportioned according to their ingredients. On the side of each bag is written the recipe for the answer, so it's good for mass production, like cassoulet. My cooker does a million beans in a couple of seconds.
Bon apetit!