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]Filter

javemarjavemar Member Posts: 23 Contributor II
edited June 2019 in Help
Hello

I has been testing rapidminer, but I don't understand why the below process dont work. My process is supposed  generate one data, then, I set  a macro with the same value that I did on the before operator. Then,  I make a filter with the value of the macro. I expected to get one value in the result overview, but I got anything.

Could anybody help me?

<?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="349" width="480">
     <operator activated="true" class="generate_data_user_specification" compatibility="5.2.003" expanded="true" height="60" name="Generate Data by User Specification" width="90" x="45" y="120">
       <list key="attribute_values">
         <parameter key="correo" value="&quot;uno&quot;"/>
       </list>
       <list key="set_additional_roles"/>
     </operator>
     <operator activated="true" class="set_macro" compatibility="5.2.003" expanded="true" height="76" name="Set Macro" width="90" x="179" y="120">
       <parameter key="macro" value="valor"/>
       <parameter key="value" value="&quot;uno&quot;"/>
     </operator>
     <operator activated="true" class="filter_examples" compatibility="5.2.003" expanded="true" height="76" name="Filter Examples" width="90" x="313" y="120">
       <parameter key="condition_class" value="attribute_value_filter"/>
       <parameter key="parameter_string" value="correo=%{valor}"/>
     </operator>
     <connect from_op="Generate Data by User Specification" from_port="output" to_op="Set Macro" to_port="through 1"/>
     <connect from_op="Set Macro" from_port="through 1" to_op="Filter Examples" to_port="example set input"/>
     <connect from_op="Filter Examples" from_port="example set output" 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>
Tagged:

Answers

  • Nils_WoehlerNils_Woehler Member Posts: 463 Maven
    Hi,

    you need to write your macro value without quotation marks.

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.2.007">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.2.007" expanded="true" name="Process">
        <process expanded="true" height="460" width="550">
          <operator activated="true" class="generate_data_user_specification" compatibility="5.2.007" expanded="true" height="60" name="Generate Data by User Specification" width="90" x="45" y="120">
            <list key="attribute_values">
              <parameter key="correo" value="&quot;uno&quot;"/>
            </list>
            <list key="set_additional_roles"/>
          </operator>
          <operator activated="true" class="set_macro" compatibility="5.2.007" expanded="true" height="76" name="Set Macro" width="90" x="179" y="120">
            <parameter key="macro" value="valor"/>
            <parameter key="value" value="uno"/>
          </operator>
          <operator activated="true" class="filter_examples" compatibility="5.2.007" expanded="true" height="76" name="Filter Examples" width="90" x="313" y="120">
            <parameter key="condition_class" value="attribute_value_filter"/>
            <parameter key="parameter_string" value="correo=%{valor}"/>
          </operator>
          <connect from_op="Generate Data by User Specification" from_port="output" to_op="Set Macro" to_port="through 1"/>
          <connect from_op="Set Macro" from_port="through 1" to_op="Filter Examples" to_port="example set input"/>
          <connect from_op="Filter Examples" from_port="example set output" 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>


    Best,
    Nils
  • javemarjavemar Member Posts: 23 Contributor II
    Thanks  Nils.
Sign In or Register to comment.