"java.lang.NullPointerExceptiond:when using Voting inside X-Validation"

User: "Legacy User"
New Altair Community Member
Updated by Jocelyn
Helllo,

I a trying to use a voting operator inside X-Validation but it fails. In the log I can find a  java.lang.NullPointerException. The same happens when I use stacking as well, but only sometimes and I am not able to reproduce it now.
I am using RM 5.3.01, so the latest update.

Best,
Elena
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.015">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="5.3.015" expanded="true" name="Process">
    <process expanded="true">
      <operator activated="true" class="retrieve" compatibility="5.3.015" expanded="true" height="60" name="Retrieve mapping_locationTypeID_tags_noOutliers_ResultSet" width="90" x="45" y="120">
        <parameter key="repository_entry" value="../../data/mapping_locationTypeID_tags_noOutliers_ResultSet"/>
      </operator>
      <operator activated="true" class="retrieve" compatibility="5.3.015" expanded="true" height="60" name="Retrieve ResultSet_Combined_DFKI_and_IMMI (2)" width="90" x="45" y="30">
        <parameter key="repository_entry" value="../../results/Combined_ResultSets/ResultSet_Combined_DFKI_and_IMMI"/>
      </operator>
      <operator activated="true" class="join" compatibility="5.3.015" expanded="true" height="76" name="Join" width="90" x="179" y="75">
        <parameter key="use_id_attribute_as_key" value="false"/>
        <list key="key_attributes">
          <parameter key="FileName" value="filename"/>
        </list>
      </operator>
      <operator activated="true" class="set_role" compatibility="5.3.015" expanded="true" height="76" name="Set Role" width="90" x="313" y="75">
        <parameter key="attribute_name" value="locationtype"/>
        <parameter key="target_role" value="label"/>
        <list key="set_additional_roles"/>
      </operator>
      <operator activated="true" class="normalize" compatibility="5.3.015" expanded="true" height="94" name="Normalize" width="90" x="447" y="75"/>
      <operator activated="true" class="x_validation" compatibility="5.3.015" expanded="true" height="130" name="Validation" width="90" x="447" y="255">
        <process expanded="true">
          <operator activated="true" class="vote" compatibility="5.3.015" expanded="true" height="60" name="Vote" width="90" x="112" y="75">
            <process expanded="true">
              <operator activated="true" class="weka:W-RandomForest" compatibility="5.3.001" expanded="true" height="76" name="W-RandomForest" width="90" x="328" y="30"/>
              <operator activated="true" class="polynomial_by_binomial_classification" compatibility="5.3.015" expanded="true" height="76" name="Polynominal by Binominal Classification" width="90" x="328" y="48">
                <parameter key="classification_strategies" value="1 against 1"/>
                <process expanded="true">
                  <operator activated="true" class="support_vector_machine_linear" compatibility="5.3.015" expanded="true" name="SVM (Linear)"/>
                  <connect from_port="training set" to_op="SVM (Linear)" to_port="training set"/>
                  <connect from_op="SVM (Linear)" from_port="model" to_port="model"/>
                  <portSpacing port="source_training set" spacing="0"/>
                  <portSpacing port="sink_model" spacing="0"/>
                </process>
              </operator>
              <operator activated="true" class="polynomial_by_binomial_classification" compatibility="5.3.015" expanded="true" height="76" name="Polynominal by Binominal Classification (2)" width="90" x="328" y="66">
                <process expanded="true">
                  <operator activated="true" class="support_vector_machine_linear" compatibility="5.3.015" expanded="true" name="SVM (2)"/>
                  <connect from_port="training set" to_op="SVM (2)" to_port="training set"/>
                  <connect from_op="SVM (2)" from_port="model" to_port="model"/>
                  <portSpacing port="source_training set" spacing="0"/>
                  <portSpacing port="sink_model" spacing="0"/>
                </process>
              </operator>
              <operator activated="true" class="naive_bayes_kernel" compatibility="5.3.015" expanded="true" height="76" name="Naive Bayes (Kernel)" width="90" x="328" y="84"/>
              <connect from_port="training set 1" to_op="W-RandomForest" to_port="training set"/>
              <connect from_port="training set 2" to_op="Polynominal by Binominal Classification" to_port="training set"/>
              <connect from_port="training set 3" to_op="Polynominal by Binominal Classification (2)" to_port="training set"/>
              <connect from_port="training set 4" to_op="Naive Bayes (Kernel)" to_port="training set"/>
              <connect from_op="W-RandomForest" from_port="model" to_port="base model 1"/>
              <connect from_op="Polynominal by Binominal Classification" from_port="model" to_port="base model 2"/>
              <connect from_op="Polynominal by Binominal Classification (2)" from_port="model" to_port="base model 3"/>
              <connect from_op="Naive Bayes (Kernel)" from_port="model" to_port="base model 4"/>
              <portSpacing port="source_training set 1" spacing="0"/>
              <portSpacing port="source_training set 2" spacing="0"/>
              <portSpacing port="source_training set 3" spacing="0"/>
              <portSpacing port="source_training set 4" spacing="0"/>
              <portSpacing port="source_training set 5" spacing="0"/>
              <portSpacing port="sink_base model 1" spacing="0"/>
              <portSpacing port="sink_base model 2" spacing="0"/>
              <portSpacing port="sink_base model 3" spacing="0"/>
              <portSpacing port="sink_base model 4" spacing="0"/>
              <portSpacing port="sink_base model 5" spacing="0"/>
            </process>
          </operator>
          <connect from_port="training" to_op="Vote" to_port="training set"/>
          <connect from_op="Vote" 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="5.3.015" expanded="true" height="76" name="Apply Model (2)" width="90" x="45" y="30">
            <list key="application_parameters"/>
          </operator>
          <operator activated="true" class="performance_classification" compatibility="5.3.015" expanded="true" height="76" name="Performance" width="90" x="196" y="97">
            <list key="class_weights"/>
          </operator>
          <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_op="Apply Model (2)" 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"/>
          <portSpacing port="sink_averagable 3" spacing="0"/>
        </process>
      </operator>
      <connect from_op="Retrieve mapping_locationTypeID_tags_noOutliers_ResultSet" from_port="output" to_op="Join" to_port="right"/>
      <connect from_op="Retrieve ResultSet_Combined_DFKI_and_IMMI (2)" from_port="output" to_op="Join" to_port="left"/>
      <connect from_op="Join" from_port="join" to_op="Set Role" to_port="example set input"/>
      <connect from_op="Set Role" from_port="example set output" to_op="Normalize" to_port="example set input"/>
      <connect from_op="Normalize" 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"/>
      <connect from_op="Validation" from_port="averagable 2" to_port="result 4"/>
      <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"/>
      <portSpacing port="sink_result 5" spacing="0"/>
    </process>
  </operator>
</process>

Find more posts tagged with