The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
ArrayIndexOutOfBoundsException
marvin_souza
Member Posts: 2 Contributor I
Hi all.
I am using the RapidMiner to do Task Inference in my Master tesis. After some tests with different data, occured a strange error.
First I will describe my scenario.
XML:
I am using the RapidMiner to do Task Inference in my Master tesis. After some tests with different data, occured a strange error.
First I will describe my scenario.
XML:
<operator name="Root" class="Process" expanded="yes">My data:
<operator name="DatabaseExampleSource" class="DatabaseExampleSource">
<parameter key="database_system" value="PostgreSQL"/>
<parameter key="database_url" value="jdbc:postgresql://parara:5432/exehda"/>
<parameter key="username" value="marcos"/>
<parameter key="password" value="vBwyakUxtRE="/>
<parameter key="query" value="SELECT t.name as task,h.sector, h.time_frame, h.main_device, sec.info, sec.type FROM exehda_history h left join exehda_history_sec_ctx sec on sec.id_history=h.id join exehda_task t on h.id_task = t.id where h.id_user = 1"/>
<parameter key="label_attribute" value="task"/>
<parameter key="datamanagement" value="double_sparse_array"/>
</operator>
<operator name="DecisionTree" class="DecisionTree">
<parameter key="criterion" value="information_gain"/>
<parameter key="minimal_size_for_split" value="5"/>
<parameter key="minimal_leaf_size" value="3"/>
<parameter key="minimal_gain" value="0.2"/>
<parameter key="number_of_prepruning_alternatives" value="2"/>
<parameter key="no_pre_pruning" value="true"/>
<parameter key="no_pruning" value="true"/>
</operator>
</operator>
When I run this proccess, I got the error:
AtendimentoPaciente clinica 43 desktop (null) (null)
AtendimentoPaciente clinica 42 desktop (null) (null)
AtendimentoPaciente clinica 42 desktop (null) (null)
AtendimentoPaciente clinica 41 desktop (null) (null)
AtendimentoPaciente clinica 41 desktop (null) (null)
AtendimentoPaciente clinica 40 desktop (null) (null)
AtendimentoPaciente clinica 40 desktop (null) (null)
Cirurgia clinica 45 desktop (null) (null)
If the data is generated randomically, this don't happen. Some suggestion ?
java.lang.ArrayIndexOutOfBoundsException: 0
at com.rapidminer.operator.learner.tree.InfoGainCriterion.getBenefit(InfoGainCriterion.java:66)
at com.rapidminer.operator.learner.tree.InfoGainCriterion.getNominalBenefit(InfoGainCriterion.java:56)
at com.rapidminer.operator.learner.tree.TreeBuilder.calculateBenefit(TreeBuilder.java:108)
at com.rapidminer.operator.learner.tree.TreeBuilder.calculateAllBenefits(TreeBuilder.java:134)
at com.rapidminer.operator.learner.tree.TreeBuilder.buildTree(TreeBuilder.java:157)
at com.rapidminer.operator.learner.tree.TreeBuilder.learnTree(TreeBuilder.java:93)
at com.rapidminer.operator.learner.tree.AbstractTreeLearner.learn(AbstractTreeLearner.java:109)
at com.rapidminer.operator.learner.AbstractLearner.apply(AbstractLearner.java:88)
at com.rapidminer.operator.Operator.apply(Operator.java:671)
at com.rapidminer.operator.OperatorChain.apply(OperatorChain.java:424)
at com.rapidminer.operator.Operator.apply(Operator.java:671)
at com.rapidminer.Process.run(Process.java:735)
at com.rapidminer.Process.run(Process.java:704)
at com.rapidminer.Process.run(Process.java:694)
at com.rapidminer.gui.ProcessThread.run(ProcessThread.java:59)
0
Answers
When I remove the columns info and type, everything works fine.
I assume that the data is loaded as "(null)", not as missing values. Correct ?
Another Question: Do the mentioned columns have each only one unique value ?
regards,
Steffen