Options

"SEVERE: java.lang.ArrayIndexOutOfBoundsException"

jtanjtan Member Posts: 9 Contributor II
edited May 2019 in Help
I choose 4 classiers in RM5. Attached the XML as well as the error log. All three learners generated/run perfectly except one which is based on Naive Bayes. The error is array out of bounds exception.

Is this a known issue or something I missed in the flow?

Thanks.

Process XML -

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.0">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" expanded="true" name="Process">
    <parameter key="logverbosity" value="off"/>
    <process expanded="true" height="543" width="701">
      <operator activated="true" class="retrieve" expanded="true" height="60" name="Retrieve" width="90" x="45" y="30">
        <parameter key="repository_entry" value="stakeholder"/>
      </operator>
      <operator activated="true" class="multiply" expanded="true" height="130" name="Multiply" width="90" x="45" y="210"/>
      <operator activated="true" class="weight_by_user_specification" expanded="true" height="76" name="Weight by User Specification" width="90" x="246" y="30">
        <list key="name_regex_to_weights">
          <parameter key="POLITICAL" value="10.0"/>
          <parameter key="ECONOMIC" value="10.0"/>
          <parameter key="EXTERNAL" value="10.0"/>
          <parameter key="SOCIAL" value="10.0"/>
          <parameter key="RELIGIOUS" value="10.0"/>
          <parameter key="SECURITY" value="10.0"/>
          <parameter key="INTELLIGENCE" value="10.0"/>
        </list>
      </operator>
      <operator activated="true" class="k_means_kernel" expanded="true" height="76" name="Clustering" width="90" x="380" y="30">
        <parameter key="add_as_label" value="true"/>
      </operator>
      <operator activated="true" class="write_model" expanded="true" height="60" name="Write Model (4)" width="90" x="581" y="30">
        <parameter key="model_file" value="C:\rapidminer\model\KMeans.mod"/>
      </operator>
      <operator activated="true" class="naive_bayes" expanded="true" height="76" name="Naive Bayes" width="90" x="380" y="435"/>
      <operator activated="true" class="write_model" expanded="true" height="60" name="Write Model (2)" width="90" x="581" y="435">
        <parameter key="model_file" value="C:\rapidminer\model\NaiveBayes.mod"/>
      </operator>
      <operator activated="true" class="decision_tree" expanded="true" height="76" name="Decision Tree" width="90" x="380" y="300"/>
      <operator activated="true" class="write_model" expanded="true" height="60" name="Write Model" width="90" x="581" y="300">
        <parameter key="model_file" value="C:\rapidminer\model\DecisionTree.mod"/>
      </operator>
      <operator activated="true" class="nominal_to_numerical" expanded="true" height="94" name="Nominal to Numerical" width="90" x="246" y="165"/>
      <operator activated="true" class="neural_net" expanded="true" height="76" name="Neural Net" width="90" x="380" y="165">
        <list key="hidden_layers"/>
      </operator>
      <operator activated="true" class="write_model" expanded="true" height="60" name="Write Model (3)" width="90" x="581" y="165">
        <parameter key="model_file" value="C:\rapidminer\model\NeuralNet.mod"/>
      </operator>
      <connect from_op="Retrieve" from_port="output" to_op="Multiply" to_port="input"/>
      <connect from_op="Multiply" from_port="output 1" to_op="Nominal to Numerical" to_port="example set input"/>
      <connect from_op="Multiply" from_port="output 2" to_op="Weight by User Specification" to_port="example set"/>
      <connect from_op="Multiply" from_port="output 3" to_op="Decision Tree" to_port="training set"/>
      <connect from_op="Multiply" from_port="output 4" to_op="Naive Bayes" to_port="training set"/>
      <connect from_op="Weight by User Specification" from_port="example set" to_op="Clustering" to_port="example set"/>
      <connect from_op="Clustering" from_port="cluster model" to_op="Write Model (4)" to_port="input"/>
      <connect from_op="Write Model (4)" from_port="through" to_port="result 1"/>
      <connect from_op="Naive Bayes" from_port="model" to_op="Write Model (2)" to_port="input"/>
      <connect from_op="Write Model (2)" from_port="through" to_port="result 4"/>
      <connect from_op="Decision Tree" from_port="model" to_op="Write Model" to_port="input"/>
      <connect from_op="Write Model" from_port="through" to_port="result 3"/>
      <connect from_op="Nominal to Numerical" from_port="example set output" to_op="Neural Net" to_port="training set"/>
      <connect from_op="Neural Net" from_port="model" to_op="Write Model (3)" to_port="input"/>
      <connect from_op="Write Model (3)" from_port="through" to_port="result 2"/>
      <portSpacing port="source_input 1" spacing="0"/>
      <portSpacing port="sink_result 1" spacing="0"/>
      <portSpacing port="sink_result 2" spacing="72"/>
      <portSpacing port="sink_result 3" spacing="72"/>
      <portSpacing port="sink_result 4" spacing="108"/>
      <portSpacing port="sink_result 5" spacing="36"/>
    </process>
  </operator>
</process>

Log file -

Oct 9, 2009 3:57:54 PM CONFIG: Loading perspectives.
Oct 9, 2009 3:59:08 PM INFO: Process file version is 50
Oct 9, 2009 4:11:13 PM INFO: Decoupling process from location //NewLocalRepository//stakeholder_weighted. Process is now associated with file //NewLocalRepository//stakeholder_weighted.
Oct 9, 2009 4:11:13 PM INFO: Saved process definition at '//NewLocalRepository//stakeholder_weighted'.
Oct 9, 2009 4:11:16 PM INFO: Saved process definition at '//NewLocalRepository//stakeholder_weighted'.
Oct 9, 2009 4:11:17 PM INFO: ImprovedNeuralNet: No hidden layers defined. Using default hidden layer.
Oct 9, 2009 4:12:40 PM INFO: Process file version is 50
Oct 9, 2009 4:12:57 PM INFO: Process file version is 50
Oct 9, 2009 4:13:45 PM INFO: Saved process definition at '//NewLocalRepository//stakeholder_test2'.
Oct 9, 2009 4:13:46 PM INFO: No filename given for result file, using stdout for logging results!
Oct 9, 2009 4:13:46 PM INFO: Process starts
Oct 9, 2009 4:13:46 PM WARNING: Process not attached to a file. Trying abolute filename 'C:\RapidMiner\model\KMeans.mod'.
Oct 9, 2009 4:13:46 PM WARNING: Process not attached to a file. Trying abolute filename 'C:\RapidMiner\model\KMeans.mod'.
Oct 9, 2009 4:13:47 PM WARNING: Process not attached to a file. Trying abolute filename 'C:\RapidMiner\model\NeuralNet.mod'.
Oct 9, 2009 4:13:47 PM WARNING: Process not attached to a file. Trying abolute filename 'C:\RapidMiner\model\NeuralNet.mod'.
Oct 9, 2009 4:13:47 PM WARNING: ImprovedNeuralNet: The number of regular attributes of the given example set does not fit the number of attributes of the training example set, training: 12, application: 13
Oct 9, 2009 4:13:47 PM WARNING: ImprovedNeuralNet: The value types between training and application differ for attribute 'NATURE_OF_COUNTRY', training: numeric, application: nominal
Oct 9, 2009 4:13:47 PM WARNING: ImprovedNeuralNet: The value types between training and application differ for attribute 'DESIRED_OUTCOME', training: numeric, application: nominal
Oct 9, 2009 4:13:47 PM WARNING: ImprovedNeuralNet: The value types between training and application differ for attribute 'METHOD', training: numeric, application: nominal
Oct 9, 2009 4:13:47 PM WARNING: ImprovedNeuralNet: The value types between training and application differ for attribute 'STAKEHOLDER_MAPPING', training: numeric, application: nominal
Oct 9, 2009 4:13:47 PM WARNING: Process not attached to a file. Trying abolute filename 'C:\RapidMiner\model\DecisionTree.mod'.
Oct 9, 2009 4:13:47 PM WARNING: Process not attached to a file. Trying abolute filename 'C:\RapidMiner\model\DecisionTree.mod'.
Oct 9, 2009 4:13:47 PM WARNING: Tree: The number of regular attributes of the given example set does not fit the number of attributes of the training example set, training: 12, application: 13
Oct 9, 2009 4:13:47 PM WARNING: Tree: The number of nominal values is not the same for training and application for attribute 'STAKEHOLDER_MAPPING', training: 3, application: 2
Oct 9, 2009 4:13:47 PM WARNING: Process not attached to a file. Trying abolute filename 'C:\RapidMiner\model\NaiveBayes.mod'.
Oct 9, 2009 4:13:48 PM WARNING: Process not attached to a file. Trying abolute filename 'C:\RapidMiner\model\NaiveBayes.mod'.
Oct 9, 2009 4:13:48 PM SEVERE: Process failed: operator cannot be executed (Exception at Apply Model (4).unlabelled data: No data.). Check the log messages...
Oct 9, 2009 4:13:48 PM SEVERE: Here:          Process[1] (Process)

          subprocess 'Main Process'

            +- Read Model[1] (Read Model)

            +- Retrieve[1] (Retrieve)

            +- Multiply[1] (Multiply)

            +- Apply Model[1] (Apply Model)

            +- Read Model (2)[1] (Read Model)

            +- Apply Model (2)[1] (Apply Model)

            +- Read Model (3)[1] (Read Model)

            +- Apply Model (3)[1] (Apply Model)

            +- Read Model (4)[1] (Read Model)

      ==>  +- Apply Model (4)[1] (Apply Model)
Oct 9, 2009 4:14:27 PM INFO: Saved process definition at '//NewLocalRepository//stakeholder_test2'.
Oct 9, 2009 4:14:28 PM INFO: No filename given for result file, using stdout for logging results!
Oct 9, 2009 4:14:28 PM INFO: Process starts
Oct 9, 2009 4:14:28 PM WARNING: Process not attached to a file. Trying abolute filename 'C:\RapidMiner\model\KMeans.mod'.
Oct 9, 2009 4:14:28 PM WARNING: Process not attached to a file. Trying abolute filename 'C:\RapidMiner\model\KMeans.mod'.
Oct 9, 2009 4:14:28 PM WARNING: Process not attached to a file. Trying abolute filename 'C:\RapidMiner\model\NeuralNet.mod'.
Oct 9, 2009 4:14:28 PM WARNING: Process not attached to a file. Trying abolute filename 'C:\RapidMiner\model\NeuralNet.mod'.
Oct 9, 2009 4:14:29 PM WARNING: ImprovedNeuralNet: The number of regular attributes of the given example set does not fit the number of attributes of the training example set, training: 12, application: 13
Oct 9, 2009 4:14:29 PM WARNING: ImprovedNeuralNet: The value types between training and application differ for attribute 'NATURE_OF_COUNTRY', training: numeric, application: nominal
Oct 9, 2009 4:14:29 PM WARNING: ImprovedNeuralNet: The value types between training and application differ for attribute 'DESIRED_OUTCOME', training: numeric, application: nominal
Oct 9, 2009 4:14:29 PM WARNING: ImprovedNeuralNet: The value types between training and application differ for attribute 'METHOD', training: numeric, application: nominal
Oct 9, 2009 4:14:29 PM WARNING: ImprovedNeuralNet: The value types between training and application differ for attribute 'STAKEHOLDER_MAPPING', training: numeric, application: nominal
Oct 9, 2009 4:14:29 PM WARNING: Process not attached to a file. Trying abolute filename 'C:\RapidMiner\model\DecisionTree.mod'.
Oct 9, 2009 4:14:29 PM WARNING: Process not attached to a file. Trying abolute filename 'C:\RapidMiner\model\DecisionTree.mod'.
Oct 9, 2009 4:14:29 PM WARNING: Tree: The number of regular attributes of the given example set does not fit the number of attributes of the training example set, training: 12, application: 13
Oct 9, 2009 4:14:29 PM WARNING: Tree: The number of nominal values is not the same for training and application for attribute 'STAKEHOLDER_MAPPING', training: 3, application: 2
Oct 9, 2009 4:14:29 PM WARNING: Process not attached to a file. Trying abolute filename 'C:\RapidMiner\model\NaiveBayes.mod'.
Oct 9, 2009 4:14:29 PM WARNING: Process not attached to a file. Trying abolute filename 'C:\RapidMiner\model\NaiveBayes.mod'.
Oct 9, 2009 4:14:29 PM WARNING: SimpleDistribution: The number of regular attributes of the given example set does not fit the number of attributes of the training example set, training: 12, application: 13
Oct 9, 2009 4:14:29 PM WARNING: SimpleDistribution: The number of nominal values is not the same for training and application for attribute 'STAKEHOLDER_MAPPING', training: 3, application: 2
Oct 9, 2009 4:14:29 PM SEVERE: Process failed: operator cannot be executed (12). Check the log messages...
Oct 9, 2009 4:14:29 PM SEVERE: Here:          Process[1] (Process)

          subprocess 'Main Process'

            +- Read Model[1] (Read Model)

            +- Retrieve[1] (Retrieve)

            +- Multiply[1] (Multiply)

            +- Apply Model[1] (Apply Model)

            +- Read Model (2)[1] (Read Model)

            +- Apply Model (2)[1] (Apply Model)

            +- Read Model (3)[1] (Read Model)

            +- Apply Model (3)[1] (Apply Model)

            +- Read Model (4)[1] (Read Model)

      ==>  +- Apply Model (4)[1] (Apply Model)
Oct 9, 2009 4:14:29 PM SEVERE: java.lang.ArrayIndexOutOfBoundsException: 12
Oct 9, 2009 4:15:21 PM INFO: Process file version is 50
Tagged:

Answers

  • Options
    landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi,
    sorry, but without the data or at least the stack trace I can't say anything about this error. Perhaps you could reproduce this error with an generated example set using the generate data operator?

    Greetings,
      Sebastian
Sign In or Register to comment.