Problem in training a decision tree with a data set including nominal values

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

I am trying to train a decision tree using RapidMiner 5.0 version. The data set includes nominal values in addition to id and label fields. When try to create the tree, it gives an error message. When all the fields are 'real' type (except id and label fields) the tree gets created without problem.

Please can someone tell is there any limitation in training a decision tree with a data set with nominal values. Is there any specific operators available in RapidMiner that have to be used this training process?

The error message displayed is as follows.

Exception: com.rapidminer.example.AttributeTypeException
Message: Cannot map index of nominal attribute to nominal value: index -1 is out of bounds!
Stack trace:

  com.rapidminer.example.table.PolynominalMapping.mapIndex(PolynominalMapping.java:137)
  com.rapidminer.operator.learner.tree.SingleLabelTermination.shouldStop(SingleLabelTermination.java:41)
  com.rapidminer.operator.learner.tree.TreeBuilder.shouldStop(TreeBuilder.java:125)
  com.rapidminer.operator.learner.tree.TreeBuilder.buildTree(TreeBuilder.java:145)
  com.rapidminer.operator.learner.tree.TreeBuilder.buildTree(TreeBuilder.java:220)
  com.rapidminer.operator.learner.tree.TreeBuilder.buildTree(TreeBuilder.java:220)
  com.rapidminer.operator.learner.tree.TreeBuilder.buildTree(TreeBuilder.java:220)
  com.rapidminer.operator.learner.tree.TreeBuilder.buildTree(TreeBuilder.java:220)
  com.rapidminer.operator.learner.tree.TreeBuilder.buildTree(TreeBuilder.java:220)
  com.rapidminer.operator.learner.tree.TreeBuilder.buildTree(TreeBuilder.java:220)
  com.rapidminer.operator.learner.tree.TreeBuilder.learnTree(TreeBuilder.java:94)
  com.rapidminer.operator.learner.tree.AbstractTreeLearner.learn(AbstractTreeLearner.java:119)
  com.rapidminer.operator.learner.AbstractLearner.doWork(AbstractLearner.java:151)
  com.rapidminer.operator.Operator.execute(Operator.java:771)
  com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:51)
  com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:709)
  com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:368)
  com.rapidminer.operator.Operator.execute(Operator.java:771)
  com.rapidminer.Process.run(Process.java:899)
  com.rapidminer.Process.run(Process.java:795)
  com.rapidminer.Process.run(Process.java:790)
  com.rapidminer.Process.run(Process.java:780)
  com.rapidminer.gui.ProcessThread.run(ProcessThread.java:62)

Thank you.

Kushani

Answers

  • MariusHelf
    MariusHelf New Altair Community Member
    Hi Kushani,
    you write that you are using RapidMiner 5.0. Please update to the current Version 5.1.008, e.g. via "update RapidMiner" in the Help-menu inside RapidMiner.

    If the error still occurs with the new version, please write again, and give some more detailed information, especially which tree operator you are using.

    Cheers, Marius