1

I have trained a model using neural set operator, now I want to apply that model and evaluate its performance on test data (with out label attribute). For this, I used apply model operator with its first input is my trained modeled data's output that contains (predicted and confidence values) and the second input of apply model operator is my Unlabelled test data, for referencce (How to test on testset using Rapidminer? ). Below is the screenshot of my original model before execution:

Original Model

When I execute the process, it throws, Input example set must have special attribute label, see the below screenshot:

Missing Label

When I click link to Help me solve the problem , it adds set role operator where I set my label attribute, after execution it displays missing predicted label attribute,

Missing Predicted Labelled Attribute

UPDATED: please see the XML below:

<?xml version="1.0" encoding="UTF-8"?><process version="8.2.000">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="8.2.000" expanded="true" name="Process">
<process expanded="true">
  <operator activated="true" class="retrieve" compatibility="8.2.000" expanded="true" height="68" name="Retrieve" width="90" x="246" y="34">
    <parameter key="repository_entry" value="../data/neural"/>
  </operator>
  <operator activated="true" class="set_role" compatibility="8.2.000" expanded="true" height="82" name="Set Role (2)" width="90" x="380" y="34">
    <parameter key="attribute_name" value="Elective1"/>
    <parameter key="target_role" value="label"/>
    <list key="set_additional_roles"/>
  </operator>
  <operator activated="true" class="nominal_to_numerical" compatibility="8.2.000" expanded="true" height="103" name="Nominal to Numerical" width="90" x="514" y="34">
    <list key="comparison_groups"/>
  </operator>
  <operator activated="true" class="neural_net" compatibility="8.2.000" expanded="true" height="82" name="Neural Net" width="90" x="648" y="34">
    <list key="hidden_layers"/>
  </operator>
  <operator activated="true" class="retrieve" compatibility="8.2.000" expanded="true" height="68" name="Retrieve (2)" width="90" x="246" y="136">
    <parameter key="repository_entry" value="../data/testing neural"/>
  </operator>
  <operator activated="true" class="apply_model" compatibility="8.2.000" expanded="true" height="82" name="Apply Model (2)" width="90" x="447" y="187">
    <list key="application_parameters"/>
  </operator>
  <operator activated="true" class="apply_model" compatibility="8.2.000" expanded="true" height="82" name="Apply Model" width="90" x="648" y="187">
    <list key="application_parameters"/>
  </operator>
  <operator activated="true" class="set_role" compatibility="8.2.000" expanded="true" height="82" name="Set Role" width="90" x="916" y="85">
    <parameter key="attribute_name" value="prediction(Elective1)"/>
    <parameter key="target_role" value="label"/>
    <list key="set_additional_roles"/>
  </operator>
  <operator activated="true" class="performance" compatibility="8.2.000" expanded="true" height="82" name="Performance" width="90" x="1184" y="136"/>
  <connect from_op="Retrieve" from_port="output" to_op="Set Role (2)" to_port="example set input"/>
  <connect from_op="Set Role (2)" from_port="example set output" to_op="Nominal to Numerical" to_port="example set input"/>
  <connect from_op="Nominal to Numerical" from_port="example set output" to_op="Neural Net" to_port="training set"/>
  <connect from_op="Nominal to Numerical" from_port="preprocessing model" to_op="Apply Model (2)" to_port="model"/>
  <connect from_op="Neural Net" from_port="model" to_op="Apply Model" to_port="model"/>
  <connect from_op="Retrieve (2)" from_port="output" to_op="Apply Model (2)" to_port="unlabelled data"/>
  <connect from_op="Apply Model (2)" from_port="labelled data" to_op="Apply Model" to_port="unlabelled data"/>
  <connect from_op="Apply Model" from_port="labelled data" to_op="Set Role" to_port="example set input"/>
  <connect from_op="Set Role" from_port="example set output" to_op="Performance" to_port="labelled data"/>
  <connect from_op="Performance" from_port="performance" 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>

Any suggestions??

KeenLearner
  • 685
  • 1
  • 8
  • 25
  • Hi, your process set up looks correct and I can't spot an obvious error. Can you perhaps share the input of the performance operator. It should have an attribute with the type 'label' and on of the type 'prediction'. – David Jun 18 '18 at 07:26
  • Hi, I have one attribute that is set to label before performance operator using set role operator, how can I set this to type prediction if I already used set role operator to set the attribute to label? – KeenLearner Jun 26 '18 at 15:08
  • Brief scenario is, I have data in "retrieve" operator that contains data in 4 columns and the 4th one is of type label , whereas in "retrieve2" operator I have data with same 3 columns excluding the 4th one that I need to predict. – KeenLearner Jun 26 '18 at 16:00
  • I have added XML too in updated section – KeenLearner Jun 27 '18 at 16:15
  • Did you fixed it ? I am having the same problem. – DrGeneral Mar 27 '19 at 10:05
  • @DrGeneral no, I used the validation operator to compute the performance parameters. – KeenLearner Mar 28 '19 at 13:28

1 Answers1

-1

as much as i know u don't need two "Apply model" operators . . . try it with one apply model and connect the testing data to unl and training data to the mod

negin zi
  • 26
  • 2
  • The process set up is correct. He is applying the pre-processing model of the "Nominal to Numerical" operator to the test set. This is correct, so the same transformation is applied to both data sets. – David Jun 18 '18 at 07:24