Options

Operator Rename

MaerkliMaerkli Member Posts: 84 Guru
edited December 2018 in Help

I try to reproduce the example of Chapter 3 from the book of M. Hofmann & R. Klinkenberg. I can't introduce the new name in the Operator Rename. Version used: RapidMiner Studio Free Version 8.0.001 on Windows 7 64 Pro. Is there any incompatibility between the book and this version? Input is http://archive.ics.uci.edu/ml/machine-learning-databases/tae/tae.data

Mark

Answers

  • Options
    sgenzersgenzer Administrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,959 Community Manager

    hello @Maerkli - welcome to the community. Yes there are many inconsistencies between that online book and RM8; the former having used a much older version of the software.  I'd recommend posting your XML process here (see "Read Before Posting" on right when you reply) and attach your dataset. This way we can replicate what you're doing and help you better.

     

    Scott

     

     

  • Options
    MaerkliMaerkli Member Posts: 84 Guru

    Hallo Scott,

    Thanks a lot for the rapid (!) answer. I am quite new with RM. I tried to follow your recommendations. Here is the xml file:

     

    <?xml version="1.0" encoding="UTF-8"?><process version="8.0.001">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="8.0.001" expanded="true" name="Process">
        <process expanded="true">
          <operator activated="true" class="read_url" compatibility="8.0.001" expanded="true" height="68" name="Read URL" width="90" x="45" y="85">
            <parameter key="url" value="http://archive.ics.uci.edu/ml/machine-learning-databases/tae/tae.data"/>
            <parameter key="read_attribute_names" value="true"/>
          </operator>
          <operator activated="true" class="rename" compatibility="8.0.001" expanded="true" height="82" name="Rename" width="90" x="313" y="85">
            <parameter key="old_name" value="Att1"/>
            <parameter key="new_name" value="English Speaker"/>
            <list key="rename_additional_attributes"/>
          </operator>
          <operator activated="true" class="numerical_to_binominal" compatibility="8.0.001" expanded="true" height="82" name="Numerical to Binominal" width="90" x="447" y="85">
            <parameter key="attribute_filter_type" value="subset"/>
            <parameter key="attributes" value="|English Speaker|Summer"/>
            <parameter key="include_special_attributes" value="true"/>
            <parameter key="min" value="2.0"/>
            <parameter key="max" value="2.0"/>
          </operator>
          <operator activated="true" class="numerical_to_polynominal" compatibility="8.0.001" expanded="true" height="82" name="Numerical to Polynominal" width="90" x="648" y="85">
            <parameter key="attribute_filter_type" value="subset"/>
            <parameter key="attributes" value="Score Category|Instructor"/>
          </operator>
          <operator activated="true" class="set_role" compatibility="8.0.001" expanded="true" height="82" name="Set Role" width="90" x="246" y="289">
            <parameter key="attribute_name" value="Score Category"/>
            <parameter key="target_role" value="label"/>
            <list key="set_additional_roles"/>
          </operator>
          <operator activated="true" class="split_validation" compatibility="8.0.001" expanded="true" height="124" name="Validation" width="90" x="581" y="289">
            <process expanded="true">
              <portSpacing port="source_training" spacing="0"/>
              <portSpacing port="sink_model" spacing="0"/>
              <portSpacing port="sink_through 1" spacing="0"/>
            </process>
            <process expanded="true">
              <portSpacing port="source_model" spacing="0"/>
              <portSpacing port="source_test set" spacing="0"/>
              <portSpacing port="source_through 1" spacing="0"/>
              <portSpacing port="sink_averagable 1" spacing="0"/>
              <portSpacing port="sink_averagable 2" spacing="0"/>
            </process>
          </operator>
          <connect from_op="Read URL" from_port="output" to_op="Rename" to_port="example set input"/>
          <connect from_op="Rename" from_port="example set output" to_op="Numerical to Binominal" to_port="example set input"/>
          <connect from_op="Numerical to Binominal" from_port="example set output" to_op="Numerical to Polynominal" to_port="example set input"/>
          <connect from_op="Numerical to Polynominal" from_port="example set output" to_op="Set Role" to_port="example set input"/>
          <connect from_op="Set Role" from_port="example set output" to_op="Validation" to_port="training"/>
          <connect from_op="Validation" from_port="model" to_port="result 1"/>
          <connect from_op="Validation" from_port="training" to_port="result 2"/>
          <connect from_op="Validation" from_port="averagable 1" to_port="result 3"/>
          <portSpacing port="source_input 1" spacing="0"/>
          <portSpacing port="sink_result 1" spacing="0"/>
          <portSpacing port="sink_result 2" spacing="0"/>
          <portSpacing port="sink_result 3" spacing="0"/>
          <portSpacing port="sink_result 4" spacing="0"/>
        </process>
      </operator>
    </process>

     

    Which operator shall I choose instead of Rename in order to fix the example of M. Hofmann & R. Klinkenberg?

    Best regards,

    Mark

     

  • Options
    sgenzersgenzer Administrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,959 Community Manager

    hi @Maerkli - no problem. This should get you going. :)

     

    <?xml version="1.0" encoding="UTF-8"?><process version="8.0.001">
    <context>
    <input/>
    <output/>
    <macros/>
    </context>
    <operator activated="true" class="process" compatibility="8.0.001" expanded="true" name="Process">
    <process expanded="true">
    <operator activated="true" class="web:get_webpage" compatibility="7.3.000" expanded="true" height="68" name="Get Page" width="90" x="45" y="34">
    <parameter key="url" value="http://archive.ics.uci.edu/ml/machine-learning-databases/tae/tae.data"/>
    <list key="query_parameters"/>
    <list key="request_properties"/>
    </operator>
    <operator activated="true" class="text:write_document" compatibility="7.5.000" expanded="true" height="82" name="Write Document" width="90" x="179" y="34"/>
    <operator activated="true" class="read_csv" compatibility="8.0.001" expanded="true" height="68" name="Read CSV" width="90" x="313" y="85">
    <parameter key="column_separators" value=","/>
    <parameter key="first_row_as_names" value="false"/>
    <list key="annotations"/>
    <list key="data_set_meta_data_information"/>
    </operator>
    <operator activated="true" breakpoints="after" class="rename" compatibility="8.0.001" expanded="true" height="82" name="Rename" width="90" x="514" y="85">
    <parameter key="old_name" value="att1"/>
    <parameter key="new_name" value="English Speaker"/>
    <list key="rename_additional_attributes"/>
    </operator>
    <operator activated="true" class="numerical_to_binominal" compatibility="8.0.001" expanded="true" height="82" name="Numerical to Binominal" width="90" x="648" y="85">
    <parameter key="attribute_filter_type" value="subset"/>
    <parameter key="attributes" value="|English Speaker|Summer"/>
    <parameter key="include_special_attributes" value="true"/>
    <parameter key="min" value="2.0"/>
    <parameter key="max" value="2.0"/>
    </operator>
    <operator activated="true" class="numerical_to_polynominal" compatibility="8.0.001" expanded="true" height="82" name="Numerical to Polynominal" width="90" x="849" y="85">
    <parameter key="attribute_filter_type" value="subset"/>
    <parameter key="attributes" value="Score Category|Instructor"/>
    </operator>
    <operator activated="true" class="set_role" compatibility="8.0.001" expanded="true" height="82" name="Set Role" width="90" x="246" y="289">
    <parameter key="attribute_name" value="Score Category"/>
    <parameter key="target_role" value="label"/>
    <list key="set_additional_roles"/>
    </operator>
    <operator activated="true" class="split_validation" compatibility="8.0.001" expanded="true" height="124" name="Validation" width="90" x="581" y="289">
    <process expanded="true">
    <operator activated="true" class="concurrency:parallel_decision_tree" compatibility="8.0.001" expanded="true" height="103" name="Decision Tree" width="90" x="179" y="34"/>
    <connect from_port="training" to_op="Decision Tree" to_port="training set"/>
    <connect from_op="Decision Tree" from_port="model" to_port="model"/>
    <portSpacing port="source_training" spacing="0"/>
    <portSpacing port="sink_model" spacing="0"/>
    <portSpacing port="sink_through 1" spacing="0"/>
    </process>
    <process expanded="true">
    <operator activated="true" class="apply_model" compatibility="8.0.001" expanded="true" height="82" name="Apply Model" width="90" x="112" y="34">
    <list key="application_parameters"/>
    </operator>
    <operator activated="true" class="performance" compatibility="8.0.001" expanded="true" height="82" name="Performance" width="90" x="246" y="34"/>
    <connect from_port="model" to_op="Apply Model" to_port="model"/>
    <connect from_port="test set" to_op="Apply Model" to_port="unlabelled data"/>
    <connect from_op="Apply Model" from_port="labelled data" to_op="Performance" to_port="labelled data"/>
    <connect from_op="Performance" from_port="performance" to_port="averagable 1"/>
    <portSpacing port="source_model" spacing="0"/>
    <portSpacing port="source_test set" spacing="0"/>
    <portSpacing port="source_through 1" spacing="0"/>
    <portSpacing port="sink_averagable 1" spacing="0"/>
    <portSpacing port="sink_averagable 2" spacing="0"/>
    </process>
    </operator>
    <connect from_op="Get Page" from_port="output" to_op="Write Document" to_port="document"/>
    <connect from_op="Write Document" from_port="file" to_op="Read CSV" to_port="file"/>
    <connect from_op="Read CSV" from_port="output" to_op="Rename" to_port="example set input"/>
    <connect from_op="Rename" from_port="example set output" to_op="Numerical to Binominal" to_port="example set input"/>
    <connect from_op="Numerical to Binominal" from_port="example set output" to_op="Numerical to Polynominal" to_port="example set input"/>
    <connect from_op="Numerical to Polynominal" from_port="example set output" to_op="Set Role" to_port="example set input"/>
    <connect from_op="Set Role" from_port="example set output" to_op="Validation" to_port="training"/>
    <connect from_op="Validation" from_port="model" to_port="result 1"/>
    <connect from_op="Validation" from_port="training" to_port="result 2"/>
    <connect from_op="Validation" from_port="averagable 1" to_port="result 3"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="sink_result 1" spacing="0"/>
    <portSpacing port="sink_result 2" spacing="0"/>
    <portSpacing port="sink_result 3" spacing="0"/>
    <portSpacing port="sink_result 4" spacing="0"/>
    </process>
    </operator>
    </process>

    Scott

Sign In or Register to comment.