image

🎉 🎉 RAPIDMINER 9.10 IS OUT!!! 🎉🎉

Download the latest version helping analytics teams accelerate time-to-value for streaming and IIOT use cases.

CLICK HERE TO DOWNLOAD

"Applying new values based on filter"

clarkem1clarkem1 Member Posts: 2 Contributor I
edited June 2019 in Help
Hi Chaps,

I'm sure this is qa very simple thing but I cannot seem to find an operator which will let me do it. I essentially want to apply a filter on some data then allocate it to a particular group in a column, I.E IF Column C contains this then Column D belongs in group 1.

So simple I know but I would really appreciate some help. I have watched the tutorial videos and whilst they were useful didn't really answer my questions.
Tagged:

Answers

  • Marco_BoeckMarco_Boeck Team Lead Software Engineering Administrator, Moderator, Employee, Member, University Professor Posts: 1,963   RM Engineering
    Hi,

    you are looking for the "Generate Attributes" operator.

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="6.6.000-SNAPSHOT">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="6.6.000-SNAPSHOT" expanded="true" name="Process">
        <process expanded="true">
          <operator activated="true" class="retrieve" compatibility="6.6.000-SNAPSHOT" expanded="true" height="68" name="Retrieve Deals" width="90" x="45" y="34">
            <parameter key="repository_entry" value="//Samples/data/Deals"/>
          </operator>
          <operator activated="true" class="generate_attributes" compatibility="6.6.000-SNAPSHOT" expanded="true" height="82" name="Generate Attributes" width="90" x="179" y="34">
            <list key="function_descriptions">
              <parameter key="Rating" value="if(matches([Payment Method], &quot;.*cheque.*&quot;), &quot;bad&quot;, &quot;good&quot;)"/>
            </list>
          </operator>
          <connect from_op="Retrieve Deals" from_port="output" to_op="Generate Attributes" to_port="example set input"/>
          <connect from_op="Generate Attributes" 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>
    Regards,
    Marco
  • clarkem1clarkem1 Member Posts: 2 Contributor I
    Thanks ! :)
Sign In or Register to comment.