Options

How to look at each tested record?

ArmanArman Member Posts: 1 Contributor I
edited November 2018 in Help
When a validation is performed, a part of the dataset is used to build a model and then the model is tested on the remaining records in the dataset. I need to look at the result for each record in the testing process, say, for a classification task, I need to know which record is classified as what in the testing phase and what are the records exactly that are used for testing. Can anyone point me to the section in RapidMiner where I can find a table of the tested records and their results?

Thanks!

Answers

  • Options
    awchisholmawchisholm RapidMiner Certified Expert, Member Posts: 458 Unicorn
    Hello Arman

    Here is a process that you might be able to modify for your needs.
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.3.012">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.3.012" expanded="true" name="Process">
        <process expanded="true">
          <operator activated="true" class="retrieve" compatibility="5.3.012" expanded="true" height="60" name="Retrieve Iris" width="90" x="112" y="75">
            <parameter key="repository_entry" value="//Samples/data/Iris"/>
          </operator>
          <operator activated="true" class="set_macro" compatibility="5.3.012" expanded="true" height="76" name="Set Macro" width="90" x="246" y="75">
            <parameter key="macro" value="ValidationCounter"/>
            <parameter key="value" value="1"/>
          </operator>
          <operator activated="true" class="x_validation" compatibility="5.3.012" expanded="true" height="112" name="Validation" width="90" x="380" y="120">
            <description>Copyright Andrew Chisholm 2013

    Information Gain Ltd

    </description>
            <process expanded="true">
              <operator activated="true" class="decision_tree" compatibility="5.0.000" expanded="true" height="76" name="Decision Tree" width="90" x="45" y="30"/>
              <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="materialize_data" compatibility="5.3.012" expanded="true" height="76" name="Materialize Data" width="90" x="45" y="120"/>
              <operator activated="true" class="apply_model" compatibility="5.0.000" expanded="true" height="76" name="Apply Model" width="90" x="179" y="30">
                <list key="application_parameters"/>
              </operator>
              <operator activated="true" class="performance" compatibility="5.0.000" expanded="true" height="76" name="Performance" width="90" x="313" y="30"/>
              <operator activated="true" class="remember" compatibility="5.3.012" expanded="true" height="60" name="Remember (3)" width="90" x="313" y="255">
                <parameter key="name" value="test_%{ValidationCounter}"/>
                <parameter key="io_object" value="ExampleSet"/>
              </operator>
              <operator activated="true" class="generate_macro" compatibility="5.3.012" expanded="true" height="76" name="Generate Macro" width="90" x="514" y="30">
                <list key="function_descriptions">
                  <parameter key="ValidationCounter" value="%{ValidationCounter}+1"/>
                </list>
              </operator>
              <connect from_port="model" to_op="Apply Model" to_port="model"/>
              <connect from_port="test set" to_op="Materialize Data" to_port="example set input"/>
              <connect from_op="Materialize Data" from_port="example set output" 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_op="Generate Macro" to_port="through 1"/>
              <connect from_op="Performance" from_port="example set" to_op="Remember (3)" to_port="store"/>
              <connect from_op="Generate Macro" from_port="through 1" 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>
          <operator activated="true" class="loop" compatibility="5.3.012" expanded="true" height="112" name="Loop" width="90" x="581" y="120">
            <parameter key="set_iteration_macro" value="true"/>
            <parameter key="iterations" value="10"/>
            <process expanded="true">
              <operator activated="true" class="recall" compatibility="5.3.012" expanded="true" height="60" name="Recall" width="90" x="179" y="120">
                <parameter key="name" value="test_%{iteration}"/>
                <parameter key="io_object" value="ExampleSet"/>
              </operator>
              <connect from_port="input 1" to_port="output 1"/>
              <connect from_port="input 2" to_port="output 2"/>
              <connect from_op="Recall" from_port="result" to_port="output 3"/>
              <portSpacing port="source_input 1" spacing="0"/>
              <portSpacing port="source_input 2" spacing="0"/>
              <portSpacing port="source_input 3" spacing="0"/>
              <portSpacing port="sink_output 1" spacing="0"/>
              <portSpacing port="sink_output 2" spacing="0"/>
              <portSpacing port="sink_output 3" spacing="0"/>
              <portSpacing port="sink_output 4" spacing="0"/>
            </process>
          </operator>
          <connect from_op="Retrieve Iris" from_port="output" to_op="Set Macro" to_port="through 1"/>
          <connect from_op="Set Macro" from_port="through 1" to_op="Validation" to_port="training"/>
          <connect from_op="Validation" from_port="training" to_op="Loop" to_port="input 1"/>
          <connect from_op="Validation" from_port="averagable 1" to_op="Loop" to_port="input 2"/>
          <connect from_op="Loop" from_port="output 3" 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

    Andrew
Sign In or Register to comment.