Options

How to get label predictions from optimise selection operater

jeremyjeremy Member Posts: 11 Contributor I
edited November 2018 in Help

I wish to use the Optimise Selection (evolutionary) operator.  I have been using the example in the tutorial and cannot figure out how to see the predicted lable column in the example dataset so that I can plot predicted vs original label values. 

Best Answer

  • Options
    Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761 Unicorn
    Solution Accepted

    You can try using a Remember and Recall operator. See attached

    <?xml version="1.0" encoding="UTF-8"?><process version="7.2.003">
    <context>
    <input/>
    <output/>
    <macros/>
    </context>
    <operator activated="true" class="process" compatibility="6.0.002" expanded="true" name="Root">
    <parameter key="random_seed" value="2000"/>
    <process expanded="true">
    <operator activated="true" breakpoints="after" class="retrieve" compatibility="7.2.003" expanded="true" height="68" name="Polynomial" width="90" x="45" y="30">
    <parameter key="repository_entry" value="//Samples/data/Polynomial"/>
    </operator>
    <operator activated="true" class="optimize_selection_evolutionary" compatibility="7.2.003" expanded="true" height="103" name="Optimize Selection (Evolutionary)" width="90" x="313" y="30">
    <parameter key="keep_best_individual" value="true"/>
    <process expanded="true">
    <operator activated="true" class="split_validation" compatibility="7.2.003" expanded="true" height="124" name="Validation" width="90" x="246" y="187">
    <process expanded="true">
    <operator activated="true" class="support_vector_machine" compatibility="7.2.003" expanded="true" height="112" name="SVM" width="90" x="112" y="30"/>
    <connect from_port="training" to_op="SVM" to_port="training set"/>
    <connect from_op="SVM" 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="7.1.001" expanded="true" height="76" name="Apply Model" width="90" x="45" y="30">
    <list key="application_parameters"/>
    </operator>
    <operator activated="true" class="performance" compatibility="7.2.003" expanded="true" height="76" name="Performance" width="90" x="179" y="30"/>
    <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>
    <operator activated="true" class="apply_model" compatibility="7.2.003" expanded="true" height="82" name="Apply Model (2)" width="90" x="447" y="34">
    <list key="application_parameters"/>
    </operator>
    <operator activated="true" class="remember" compatibility="7.2.003" expanded="true" height="68" name="Remember" width="90" x="581" y="34">
    <parameter key="name" value="PredvsActual"/>
    </operator>
    <connect from_port="example set" to_op="Validation" to_port="training"/>
    <connect from_op="Validation" from_port="model" to_op="Apply Model (2)" to_port="model"/>
    <connect from_op="Validation" from_port="training" to_op="Apply Model (2)" to_port="unlabelled data"/>
    <connect from_op="Validation" from_port="averagable 1" to_port="performance"/>
    <connect from_op="Apply Model (2)" from_port="labelled data" to_op="Remember" to_port="store"/>
    <portSpacing port="source_example set" spacing="0"/>
    <portSpacing port="source_through 1" spacing="0"/>
    <portSpacing port="sink_performance" spacing="36"/>
    </process>
    </operator>
    <operator activated="true" class="recall" compatibility="7.2.003" expanded="true" height="68" name="Recall" width="90" x="514" y="136">
    <parameter key="name" value="PredvsActual"/>
    </operator>
    <connect from_op="Polynomial" from_port="output" to_op="Optimize Selection (Evolutionary)" to_port="example set in"/>
    <connect from_op="Optimize Selection (Evolutionary)" from_port="example set out" to_port="result 1"/>
    <connect from_op="Optimize Selection (Evolutionary)" from_port="performance" to_port="result 2"/>
    <connect from_op="Recall" from_port="result" to_port="result 3"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="sink_result 1" spacing="0"/>
    <portSpacing port="sink_result 2" spacing="18"/>
    <portSpacing port="sink_result 3" spacing="0"/>
    <portSpacing port="sink_result 4" spacing="0"/>
    </process>
    </operator>
    </process>
Sign In or Register to comment.