Orange Forum • View topic - BoostedLearner problems

BoostedLearner problems

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

BoostedLearner problems

Postby rakesh » Fri Jun 12, 2009 5:44

Hi,
I am trying to use the BoostedLearner class. In the code below the variable data contains my training data. I learn a model on this data. Now I want to test the classifier denoted by the variable adaboost on a test dataset (test_data) . Note that the testdataset does not have the class variable.



Code: Select all
tree = orngTree.TreeLearner(mForPruning=2, name="tree")
adaboost = orngEnsemble.BoostedLearner(tree,data,name="boosted tree")
f = open("out.txt")
for i in range(0,len(test_data)):
    f.write(str(adaboost(test_data[i])) + '\n')
f.close()


I get the following error

Traceback (most recent call last):
File "C:/Datasets/Harddataset.py", line 99, in <module>
f.write(str(adaboost(test_data[i])) + '\n')
File "C:\Python25\lib\site-packages\orange\orngEnsemble.py", line 70, in __call__
votes = [0.] * len(self.classvar.values)
AttributeError: 'BoostedClassifier' has no attribute 'classvar'


Can anybody point me what is the mistake in my code. If there is any other way of doing this please let me know

thanks in advance

Boosting Error

Postby michael.hecht » Sat Feb 06, 2010 19:35

Someone should fix this bug since many people have problems with this!


Return to Questions & Support