The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

[SOLVED] Does "Set Data" operator propagate results backward?

tennenrishintennenrishin Member Posts: 177 Contributor II
After running the following process, why is the value of x in /dbg2/b equal to 123 and not 0?
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.005">
 <context>
   <input/>
   <output/>
   <macros/>
 </context>
 <operator activated="true" class="process" compatibility="5.3.005" expanded="true" name="Process">
   <process expanded="true">
     <operator activated="true" class="generate_data_user_specification" compatibility="5.3.005" expanded="true" height="60" name="Generate Data by User Specification" width="90" x="179" y="120">
       <list key="attribute_values">
         <parameter key="a" value="&quot;&quot;"/>
         <parameter key="b" value="&quot;&quot;"/>
         <parameter key="x" value="0"/>
       </list>
       <list key="set_additional_roles"/>
     </operator>
     <operator activated="true" class="loop_attributes" compatibility="5.3.005" expanded="true" height="76" name="bubble plots" width="90" x="313" y="120">
       <parameter key="attribute_filter_type" value="regular_expression"/>
       <parameter key="regular_expression" value="[ab]"/>
       <process expanded="true">
         <operator activated="true" class="filter_examples" compatibility="5.3.005" expanded="true" height="76" name="not missing" width="90" x="45" y="30">
           <parameter key="condition_class" value="attribute_value_filter"/>
           <parameter key="parameter_string" value="%{loop_attribute}!=\?"/>
         </operator>
         <operator activated="true" class="store" compatibility="5.3.005" expanded="true" height="60" name="Store (4)" width="90" x="179" y="120">
           <parameter key="repository_entry" value="/dbg2/%{loop_attribute}"/>
         </operator>
         <operator activated="true" class="set_data" compatibility="5.3.005" expanded="true" height="76" name="set x 123" width="90" x="313" y="120">
           <parameter key="example_index" value="1"/>
           <parameter key="attribute_name" value="x"/>
           <parameter key="value" value="123"/>
           <list key="additional_values"/>
         </operator>
         <connect from_port="example set" to_op="not missing" to_port="example set input"/>
         <connect from_op="not missing" from_port="example set output" to_op="Store (4)" to_port="input"/>
         <connect from_op="not missing" from_port="original" to_port="example set"/>
         <connect from_op="Store (4)" from_port="through" to_op="set x 123" to_port="example set input"/>
         <portSpacing port="source_example set" spacing="0"/>
         <portSpacing port="sink_example set" spacing="0"/>
         <portSpacing port="sink_result 1" spacing="0"/>
       </process>
     </operator>
     <connect from_op="Generate Data by User Specification" from_port="output" to_op="bubble plots" to_port="example set"/>
     <portSpacing port="source_input 1" spacing="0"/>
     <portSpacing port="sink_result 1" spacing="0"/>
   </process>
 </operator>
</process>
Regards,
Isak

Answers

  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee-RapidMiner, Member, University Professor Posts: 1,996 RM Engineering
    Hi,

    RapidMiner works with views on the data for most operators (so the underlying data is not changed), however some operators do modify the underlying data directly and this is one of them. To avoid such a problem in a loop, you can use the "Materliaze Data" operator before you store the data, this will create a clean & fresh copy of the data.

    Regards,
    Marco
  • tennenrishintennenrishin Member Posts: 177 Contributor II
    Thanks Marco. I was relieved to find that workaround.

    I suppose this is for performance. Maybe it would be a good idea to add a "Create View" parameter such as that of the "Replace Missing Values" operator. IMhO the default (for both operators) should be true. Otherwise they don't uphold the graphical model of RM processes.

    Regards,
    Isak
Sign In or Register to comment.