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
desicion tree id3 operator gives problem
hi,
I have different types of data and i have to work with classification algorithm id3. This gives best trees for my work.
but some of my data can't work with id3, it's also can work with desicion tree and CHAİD algorithms.
my data is :
http://rapidshare.com/files/383023814/insan_rp.xls.html
and my process is(it's simple):
Exception: java.lang.RuntimeException
Message: Cannot clone com.rapidminer.example.set.SplittedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.SplittedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.OutOfMemoryError: Java heap space. Cause: java.lang.OutOfMemoryError: Java heap space.. Cause: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.SplittedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.OutOfMemoryError: Java heap space. Cause: java.lang.OutOfMemoryError: Java heap space..
Stack trace:
com.rapidminer.example.set.AbstractExampleSet.clone(AbstractExampleSet.java:390)
com.rapidminer.operator.learner.tree.TreeBuilder.buildTree(TreeBuilder.java:208)
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.buildTree(TreeBuilder.java:220)
com.rapidminer.operator.learner.tree.TreeBuilder.buildTree(TreeBuilder.java:220)
best regards.
I have different types of data and i have to work with classification algorithm id3. This gives best trees for my work.
but some of my data can't work with id3, it's also can work with desicion tree and CHAİD algorithms.
my data is :
http://rapidshare.com/files/383023814/insan_rp.xls.html
and my process is(it's simple):
<?xml version="1.0" encoding="UTF-8" standalone="no"?>and this is the failure note:
<process version="5.0">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" expanded="true" name="Process">
<process expanded="true" height="359" width="614">
<operator activated="true" class="retrieve" expanded="true" height="60" name="Retrieve" width="90" x="45" y="30">
<parameter key="repository_entry" value="//My Repository/29.04 rpler/insan"/>
</operator>
<operator activated="true" class="free_memory" expanded="true" height="76" name="Free Memory" width="90" x="179" y="75"/>
<operator activated="true" class="id3" expanded="true" height="76" name="ID3" width="90" x="246" y="255"/>
<connect from_op="Retrieve" from_port="output" to_op="Free Memory" to_port="through 1"/>
<connect from_op="Free Memory" from_port="through 1" to_op="ID3" to_port="training set"/>
<connect from_op="ID3" from_port="model" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>
Exception: java.lang.RuntimeException
Message: Cannot clone com.rapidminer.example.set.SplittedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.SplittedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.OutOfMemoryError: Java heap space. Cause: java.lang.OutOfMemoryError: Java heap space.. Cause: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.SplittedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.OutOfMemoryError: Java heap space. Cause: java.lang.OutOfMemoryError: Java heap space..
Stack trace:
com.rapidminer.example.set.AbstractExampleSet.clone(AbstractExampleSet.java:390)
com.rapidminer.operator.learner.tree.TreeBuilder.buildTree(TreeBuilder.java:208)
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.buildTree(TreeBuilder.java:220)
com.rapidminer.operator.learner.tree.TreeBuilder.buildTree(TreeBuilder.java:220)
best regards.
0
Answers
unfortunately I wasn't able to test it with your data, because I simply didn't know what was the label
But the ID3 operator works for me. Do you use the latest RapidMiner 5 version 5.0.005?
Greetings,
Sebastian
thanks for your attention.
yes i use the last version of rp.My data's label is c100 and id is c5. if you have sometime to try it, i wil be so hapyy.
best regards.
Here I am building on 50% of the data and validating on the other 50%.
my fault note is different. my computer don't gives out of memory warning.I wrote it above in my first message.
I try with naive bayes and the result is good but i need to see tree graphic and text. so i want to use id3 algorithm.
so i dont understand the problem. my computer configuration is two processer,and 1.5 gb ram with win 7 ultimate.
best regards
did you try to restrict the maximal depth of the tree and let it stop with greater leafes? And the question arises how many memory RapidMiner actually has. Please take a look in the result view at the memory monitor. What's the maximum available memory?
Greetings,
Sebastian
i restrict the maximal depth but nothing changed. I reduced minimal size for split,leaf size and gain ratio, but i'm seeing the same error.
when i redound leaf size to " 8 ",program answer it.(is this make my solution better or worse? I cant give a desicion? what you think?)
in rp system monitor shows max:773 MB and total: 773 MB.
And my computer's ( win 7 ultimate) ram cursor shows % 85. so there is also % 15 free ram for rp.
this answer provide a solution?
best regards.
Did you try sampling the data and building on a small % (say 10%) and see if it will build?
From your posting:
Exception: java.lang.RuntimeException
Message: Cannot clone com.rapidminer.example.set.SplittedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.SplittedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.OutOfMemoryError: Java heap space. Cause: java.lang.OutOfMemoryError: Java heap space.. Cause: java.lang.RuntimeException: Cannot clone com.rapidminer.example.set.SplittedExampleSet: java.lang.reflect.InvocationTargetException. Target: java.lang.OutOfMemoryError: Java heap space. Cause: java.lang.OutOfMemoryError: Java heap space..
Stack trace:
I try with sample (%10),it don't give any problem.
And i built the three. but i have 15000 examples so i want to use all of them.
best regards
p.s. dont forget to vote for rapidminer at http://www.kdnuggets.com
i try my project with 3g ram and 4 processer pc and i have the results. it works but the tree has got lots of leafs. also its a huge tree.
at the end a workstation solves the problem.:)
best regards.
I have an xml like below
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.1.006">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.1.006" expanded="true" name="Process">
<process expanded="true" height="686" width="974">
<operator activated="true" class="read_csv" compatibility="5.1.006" expanded="true" height="60" name="Read CSV" width="90" x="219" y="270">
<parameter key="csv_file" value="C:\Documents and Settings\rzkl07\RapidMinor5\golfTrain.csv"/>
<parameter key="column_separators" value=","/>
<parameter key="use_quotes" value="false"/>
<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="Outlook.true.polynominal.attribute"/>
<parameter key="1" value="Temperature.true.integer.attribute"/>
<parameter key="2" value="Humidity.true.integer.attribute"/>
<parameter key="3" value="Windy.true.binominal.attribute"/>
<parameter key="4" value="Play.true.binominal.label"/>
</list>
</operator>
<operator activated="true" class="decision_tree" compatibility="5.1.006" expanded="true" height="76" name="Decision Tree" width="90" x="425" y="275"/>
<connect from_op="Read CSV" from_port="output" to_op="Decision Tree" to_port="training set"/>
<connect from_op="Decision Tree" from_port="model" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>
i need to dispaly decision tree by reading this xml through java
Process trainData = new Process(new File("C:\\Documents and Settings\\rzkl07\\RapidMinor5\\golfTrain.xml"));
IOContainer container = trainData.run();
System.out.println(container.toString());
RESULT:IOContainer (1 objects):
Outlook = overcast: TRUE {FALSE=0, TRUE=4}
Outlook = rain
| Windy = FALSE: TRUE {FALSE=0, TRUE=3}
| Windy = TRUE: FALSE {FALSE=2, TRUE=0}
Outlook = sunny
| Humidity > 77.500: FALSE {FALSE=3, TRUE=0}
| Humidity ≤ 77.500: TRUE {FALSE=0, TRUE=2}
(created by Decision Tree)
but i need to show as graph
how can i do it from java?
first of all: please don't cross post! I have just removed the same post from three different places, none of them was correct. And please start a new topic in the correct board if you have a new subject - the correct board would have been the one for "Development"...
Don't send private messages as well - usually I just ignore them and also do not answer corresponding forum posts (if there are any).
Ok, now the answer: You can use the class "TreeModelGraphRenderer" for this (use the TreeModel as 'Renderable'). Or even better, let RapidMiner create and deliver the visualization itself by using the class "RendererService".
Cheers,
Ingo
many thanks for your reply
apologies to sent an private msg.
As you said i have used RendererService
IOObject io = ioResult.getElementAt(0);
TreeModel model = (TreeModel) ioResult.getElementAt(0);
Renderer createRenderer = RendererService.createRenderer(io, "Graph View");
Component visualizationComponent = createRenderer.getVisualizationComponent(io, ioResult);
Image createImage = visualizationComponent.createImage(100, 100);
Graphics graphics = createImage.getGraphics();
createImage returns null always
i couldn't able to trigger out ?
what could be the issue?
pls bear me
thanks in advance