Orange Forum • View topic - CN2 error

CN2 error

Report bugs (or imagined bugs).
(Archived/read-only, please use our ticketing system for reporting bugs and their discussion.)
Forum rules
Archived/read-only, please use our ticketing system for reporting bugs and their discussion.

CN2 error

Postby PhilFuXX » Sun May 07, 2006 10:34

Hi there,

everytime I use the rule based learner (CN2) on my rather small data (30 examples) Python freezes. First, I thought I may have forgotten something, but when I run the provided example (testRulelearner.py) an exception is raised after 10 mins. It says:

Traceback (most recent call last):
File "D:\PROGRA~1\Python\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript
exec codeObject in __main__.__dict__
File "D:\Programming\Python\testRulelearner.py", line 9, in ?
cl = learner(data)
KernelException: 'orange.ExampleTable.resize': out of memory


I run the script on a machine with 1.2 Gb of RAM. Am I doing something wrong?

Thanks in advance

-Peter

Postby Martin » Sat May 13, 2006 21:58

Hi Peter,

This is strange, this seems similar to a long lost bug. I ran the following script and it worked well. Can you also try it, please?

Martin

Code: Select all

import orange
import orngCN2

data = orange.ExampleTable("titanic.tab")

learner1 = orange.RuleLearner()
learner2 = orngCN2.CN2UnorderedLearner()

cl1 = learner1(data)
cl2 = learner2(data)

print "Rules from the first classifier"
for r in cl1.rules:
    print orngCN2.ruleToString(r)

print "Rules from the second classifier"
for r in cl2.rules:
    print orngCN2.ruleToString(r)


same error

Postby PhilFuXX » Tue May 16, 2006 22:34

Hi Martin,

I've got the same error message using your code snippet:

Traceback (most recent call last):
File "D:\PROGRA~1\Python\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript
exec codeObject in __main__.__dict__
File "D:\Programming\Python\test.py", line 9, in ?
cl1 = learner1(data)
KernelException: 'orange.ExampleTable.resize': out of memory


So, what do you think?

-Peter


Return to Bugs



cron