not getting prediction/confidence values after decision tree

nits_ag84
nits_ag84 New Altair Community Member
edited November 5 in Community Q&A
Hi all,

We are not able to see prediction probabilities/confidence in RapidMiner.
We have checked these at ExampleSet(Apply Model(2)) "Data View" in ApplyModel2 "lab" node.
Where else/how can we find those?
Below is the code.

Regards,
Nitin
<?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="332" width="480">
      <operator activated="true" class="read_excel" compatibility="5.2.008" expanded="true" height="60" name="Read Excel" width="90" x="45" y="30">
        <parameter key="excel_file" value="C:\Users\chin2\Desktop\472\GermanCredit.xls"/>
        <parameter key="imported_cell_range" value="A1:AF1001"/>
        <parameter key="first_row_as_names" value="false"/>
        <list key="annotations">
          <parameter key="0" value="Name"/>
        </list>
        <list key="data_set_meta_data_information">
          <parameter key="0" value="OBS#.true.nominal.id"/>
          <parameter key="1" value="CHK_ACCT.true.nominal.attribute"/>
          <parameter key="2" value="DURATION.true.numeric.attribute"/>
          <parameter key="3" value="HISTORY.true.nominal.attribute"/>
          <parameter key="4" value="NEW_CAR.true.binominal.attribute"/>
          <parameter key="5" value="USED_CAR.true.binominal.attribute"/>
          <parameter key="6" value="FURNITURE.true.binominal.attribute"/>
          <parameter key="7" value="RADIO/TV.true.binominal.attribute"/>
          <parameter key="8" value="EDUCATION.true.binominal.attribute"/>
          <parameter key="9" value="RETRAINING.true.binominal.attribute"/>
          <parameter key="10" value="AMOUNT.true.numeric.attribute"/>
          <parameter key="11" value="SAV_ACCT.true.nominal.attribute"/>
          <parameter key="12" value="EMPLOYMENT.true.nominal.attribute"/>
          <parameter key="13" value="INSTALL_RATE.true.numeric.attribute"/>
          <parameter key="14" value="MALE_DIV.true.binominal.attribute"/>
          <parameter key="15" value="MALE_SINGLE.true.binominal.attribute"/>
          <parameter key="16" value="MALE_MAR_or_WID.true.binominal.attribute"/>
          <parameter key="17" value="CO-APPLICANT.true.binominal.attribute"/>
          <parameter key="18" value="GUARANTOR.true.binominal.attribute"/>
          <parameter key="19" value="PRESENT_RESIDENT.true.nominal.attribute"/>
          <parameter key="20" value="REAL_ESTATE.true.binominal.attribute"/>
          <parameter key="21" value="PROP_UNKN_NONE.true.binominal.attribute"/>
          <parameter key="22" value="AGE.true.numeric.attribute"/>
          <parameter key="23" value="OTHER_INSTALL.true.binominal.attribute"/>
          <parameter key="24" value="RENT.true.binominal.attribute"/>
          <parameter key="25" value="OWN_RES.true.binominal.attribute"/>
          <parameter key="26" value="NUM_CREDITS.true.numeric.attribute"/>
          <parameter key="27" value="JOB.true.nominal.attribute"/>
          <parameter key="28" value="NUM_DEPENDENTS.true.numeric.attribute"/>
          <parameter key="29" value="TELEPHONE.true.binominal.attribute"/>
          <parameter key="30" value="FOREIGN.true.binominal.attribute"/>
          <parameter key="31" value="RESPONSE.true.binominal.label"/>
        </list>
      </operator>
      <operator activated="true" class="split_validation" compatibility="5.2.008" expanded="true" height="130" name="Validation" width="90" x="313" y="30">
        <parameter key="split_ratio" value="0.746"/>
        <process expanded="true" height="413" width="346">
          <operator activated="true" class="decision_tree" compatibility="5.2.008" expanded="true" height="76" name="Decision Tree" width="90" x="45" y="30">
            <parameter key="criterion" value="gini_index"/>
            <parameter key="minimal_size_for_split" value="2"/>
            <parameter key="number_of_prepruning_alternatives" value="2"/>
          </operator>
          <operator activated="true" class="create_threshold" compatibility="5.2.008" expanded="true" height="60" name="Create Threshold" width="90" x="45" y="120">
            <parameter key="first_class" value="0"/>
            <parameter key="second_class" value="1"/>
          </operator>
          <operator activated="true" class="apply_model" compatibility="5.2.008" expanded="true" height="76" name="Apply Model" width="90" x="179" y="30">
            <list key="application_parameters"/>
          </operator>
          <operator activated="true" class="apply_threshold" compatibility="5.2.008" expanded="true" height="76" name="Apply Threshold" width="90" x="179" y="165"/>
          <operator activated="true" class="performance_binominal_classification" compatibility="5.2.008" expanded="true" height="76" name="Performance" width="90" x="45" y="300"/>
          <connect from_port="training" to_op="Decision Tree" to_port="training set"/>
          <connect from_op="Decision Tree" from_port="model" to_op="Apply Model" to_port="model"/>
          <connect from_op="Decision Tree" from_port="exampleSet" to_op="Apply Model" to_port="unlabelled data"/>
          <connect from_op="Create Threshold" from_port="output" to_op="Apply Threshold" to_port="threshold"/>
          <connect from_op="Apply Model" from_port="labelled data" to_op="Apply Threshold" to_port="example set"/>
          <connect from_op="Apply Model" from_port="model" to_port="model"/>
          <connect from_op="Apply Threshold" from_port="example set" to_op="Performance" to_port="labelled data"/>
          <connect from_op="Performance" from_port="performance" to_port="through 1"/>
          <portSpacing port="source_training" spacing="0"/>
          <portSpacing port="sink_model" spacing="0"/>
          <portSpacing port="sink_through 1" spacing="252"/>
          <portSpacing port="sink_through 2" spacing="0"/>
        </process>
        <process expanded="true" height="413" width="346">
          <operator activated="true" class="apply_model" compatibility="5.2.008" expanded="true" height="76" name="Apply Model (2)" width="90" x="45" y="30">
            <list key="application_parameters"/>
          </operator>
          <operator activated="true" class="create_threshold" compatibility="5.2.008" expanded="true" height="60" name="Create Threshold (2)" width="90" x="45" y="255">
            <parameter key="first_class" value="0"/>
            <parameter key="second_class" value="1"/>
          </operator>
          <operator activated="true" class="apply_threshold" compatibility="5.2.008" expanded="true" height="76" name="Apply Threshold (2)" width="90" x="45" y="120"/>
          <operator activated="true" class="performance_binominal_classification" compatibility="5.2.008" expanded="true" height="76" name="Performance (2)" width="90" x="179" y="300"/>
          <connect from_port="model" to_op="Apply Model (2)" to_port="model"/>
          <connect from_port="test set" to_op="Apply Model (2)" to_port="unlabelled data"/>
          <connect from_port="through 1" to_port="averagable 2"/>
          <connect from_op="Apply Model (2)" from_port="labelled data" to_op="Apply Threshold (2)" to_port="example set"/>
          <connect from_op="Create Threshold (2)" from_port="output" to_op="Apply Threshold (2)" to_port="threshold"/>
          <connect from_op="Apply Threshold (2)" from_port="example set" to_op="Performance (2)" to_port="labelled data"/>
          <connect from_op="Performance (2)" 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="252"/>
          <portSpacing port="source_through 2" spacing="0"/>
          <portSpacing port="sink_averagable 1" spacing="0"/>
          <portSpacing port="sink_averagable 2" spacing="0"/>
          <portSpacing port="sink_averagable 3" spacing="0"/>
        </process>
      </operator>
      <connect from_op="Read Excel" from_port="output" to_op="Validation" to_port="training"/>
      <connect from_op="Validation" from_port="averagable 1" to_port="result 1"/>
      <connect from_op="Validation" from_port="averagable 2" to_port="result 2"/>
      <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"/>
    </process>
  </operator>
</process>
[ /code]

Answers

  • MariusHelf
    MariusHelf New Altair Community Member
    Hi Nitin,

    the X-Validation does not create a labelled data set, it just validates or evaluates how well the chosen algorithm (in your case the decision tree) works for your data.
    To get labelled data, you have to train and apply a model again outside of the cross validation.

    Best regards,
    Marius