Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.

[solved] Example application for Log-Operator

frasfras Member Posts: 93 Contributor II
edited November 2018 in Help
Hi!
From the help of operator "Log" I get the hint
to read an example from "Advanced Processes/Parameter and performance analysis".
But it seems to be in RM-Tutorial 4.4. Is there a newer one ?
Background: I want to collect (aggregated) fields from an example set also into the log.
Cheers, Frank

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.2.008">
 <context>
   <input/>
   <output/>
   <macros/>
 </context>
 <operator activated="true" class="process" compatibility="5.2.008" expanded="true" name="Process">
   <process expanded="true" height="568" width="587">
     <operator activated="true" class="generate_data" compatibility="5.2.008" expanded="true" height="60" name="Generate Data" width="90" x="45" y="300">
       <parameter key="target_function" value="random classification"/>
     </operator>
     <operator activated="true" class="aggregate" compatibility="5.2.008" expanded="true" height="76" name="Aggregate" width="90" x="179" y="120">
       <list key="aggregation_attributes">
         <parameter key="att1" value="sum"/>
       </list>
       <parameter key="group_by_attributes" value="label|"/>
     </operator>
     <operator activated="true" class="log" compatibility="5.2.008" expanded="true" height="76" name="Log" width="90" x="313" y="120">
       <parameter key="filename" value="/home/fras/test.log"/>
       <list key="log">
         <parameter key="field01" value="operator.Aggregate.parameter.attribute"/>
         <parameter key="field02" value="operator.Aggregate.parameter.attributes"/>
       </list>
     </operator>
     <connect from_op="Generate Data" from_port="output" to_op="Aggregate" to_port="example set input"/>
     <connect from_op="Aggregate" from_port="example set output" to_op="Log" to_port="through 1"/>
     <connect from_op="Log" from_port="through 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>

Answers

  • MariusHelfMariusHelf RapidMiner Certified Expert, Member Posts: 1,869 Unicorn
    Hi,

    Extract Log Value is your friend:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.2.008">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.2.008" expanded="true" name="Process">
        <process expanded="true" height="568" width="614">
          <operator activated="true" class="generate_data" compatibility="5.2.008" expanded="true" height="60" name="Generate Data" width="90" x="45" y="120">
            <parameter key="target_function" value="random classification"/>
          </operator>
          <operator activated="true" class="aggregate" compatibility="5.2.008" expanded="true" height="76" name="Aggregate" width="90" x="179" y="120">
            <list key="aggregation_attributes">
              <parameter key="att1" value="sum"/>
            </list>
            <parameter key="group_by_attributes" value="label|"/>
          </operator>
          <operator activated="true" class="extract_log_value" compatibility="5.2.008" expanded="true" height="60" name="Extract Log Value" width="90" x="313" y="120">
            <parameter key="attribute_name" value="sum(att1)"/>
            <parameter key="example_index" value="1"/>
          </operator>
          <operator activated="true" class="log" compatibility="5.2.008" expanded="true" height="76" name="Log" width="90" x="447" y="120">
            <parameter key="filename" value="/home/fras/test.log"/>
            <list key="log">
              <parameter key="field01" value="operator.Aggregate.parameter.attribute"/>
              <parameter key="field02" value="operator.Aggregate.parameter.attributes"/>
              <parameter key="sum" value="operator.Extract Log Value.value.data_value"/>
            </list>
          </operator>
          <connect from_op="Generate Data" from_port="output" to_op="Aggregate" to_port="example set input"/>
          <connect from_op="Aggregate" from_port="example set output" to_op="Extract Log Value" to_port="example set"/>
          <connect from_op="Extract Log Value" from_port="example set" to_op="Log" to_port="through 1"/>
          <connect from_op="Log" from_port="through 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>
    Best, Marius
Sign In or Register to comment.