Orange Forum • View topic - random forest examples

random forest examples

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

random forest examples

Postby Brett » Mon Nov 14, 2005 16:19

Hi,

I was trying to run the random forest examples from

http://www.ailab.si/orange/doc/modules/orngEnsemble.htm

but python does not like something about orngEnsemble.py. When I execute any of the ensemble*.py examples, I get the following

Traceback (most recent call last):
File "ensemble.py", line 7, in ?
import orange, orngEnsemble, orngTree
File "/usr/lib/python2.3/site-packages/orange/orngEnsemble.py", line 15
inf = 100000
^
IndentationError: expected an indented block

Removing the offending line from orngEnsemble.py does not help. I have been able to run other orange exmaples. I am using Fedora Core 3.

Thanks,
Brett

Re: random forest examples

Postby Brett » Mon Nov 28, 2005 20:31

To get rid of the IndentationError, I commented out line 9 of

/usr/lib/python2.3/site-packages/orange/orngEnsemble.py

i.e.,

#def boostrapSample(examples, rand, returnOutOfBag=0):

Program now runs as shown on the examples page.

-- Brett

Brett wrote:Hi,

I was trying to run the random forest examples from

http://www.ailab.si/orange/doc/modules/orngEnsemble.htm

but python does not like something about orngEnsemble.py. When I execute any of the ensemble*.py examples, I get the following

Traceback (most recent call last):
File "ensemble.py", line 7, in ?
import orange, orngEnsemble, orngTree
File "/usr/lib/python2.3/site-packages/orange/orngEnsemble.py", line 15
inf = 100000
^
IndentationError: expected an indented block

Removing the offending line from orngEnsemble.py does not help. I have been able to run other orange exmaples. I am using Fedora Core 3.

Thanks,
Brett

Postby jgilbert » Mon Nov 28, 2005 22:44

That is the IndentationError I put in the Bugs forum over here: http://www.ailab.si/orange/forum/viewtopic.php?t=205

The function definition of boostrapSample is missing.


Return to Questions & Support