Orange Forum • View topic - c4.5 crashes

c4.5 crashes

A place to ask questions about methods in Orange and how they are used and other general support.

c4.5 crashes

Postby ghyan » Thu Jun 14, 2012 18:49

Hi:

On a latest Orange version, C4.5 crashes with a segmentation fault. The code is as simple as follows:

import Orange
print Orange.__path__
data = Orange.data.Table("./x.tab")
tree = Orange.classification.tree.C45Learner(data)
print "Haha"
for i in data[:5]:
print tree(i), i.getclass()

The file x.tab has 1000 lines. After removing one data sample, the code works fine. The size of x.tab is about 355K, and there are 256 features for each sample. I am working on a Mac with 32G memory, 64bit. So memory seems not to be an issue.

The other classifiers such as kNN are fine. Any clue about what the error is?

Thanks.

Re: c4.5 crashes

Postby ghyan » Thu Jun 14, 2012 18:50

By the way, C4.5 used to work on my computer, and I miss those days :-(

Re: c4.5 crashes

Postby ghyan » Thu Jun 14, 2012 21:12

For your reference, I created a small python script for you to generate a test file named ./x.tab:

++++++
import random

random.seed(0)

output = open('./x.tab', 'w')
for i in range(256):
--> print >> output, '%d\t' % i,
print >> output, 'fff'
for i in range(256):
--> print >> output, 'c\t',
print >> output, 'd'
for i in range(256):
--> print >> output, '\t',
print >> output, 'class'
for j in range(1000):
--> for i in range(256):
-->--> print >> output, '%f\t' % random.random(),
--> print >> output, j % 10
output.close()
+++++

thanks.

Re: c4.5 crashes

Postby ghyan » Thu Jun 14, 2012 22:28

Seems that if I use python 2.6.1, the problem is gone. But if I use python 2.7, the code still crashes.

Re: c4.5 crashes

Postby lefterav » Mon Jul 23, 2012 13:55

I have the same problem. C4.5 built for python2.7 causes a segmentation fault


Return to Questions & Support