Orange Forum • View topic - testOnData does not support regression

testOnData does not support regression

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

testOnData does not support regression

Postby Guest » Mon May 09, 2005 17:25

testOnData and relatives does not work with Float classes.

Is this for any reason, or just it is not implemented?

Example code:

>>> t = orange.ExampleTable("auto-mpg.tab")
>>> import orngTest
>>> tree = orange.TreeLearner(name = "tree")
>>> orngTest.learnAndTestOnLearnData([tree], t)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/home/dax5/orange/orngTest.py", line 404, in learnAndTestOnLearnData
return testOnData(classifiers, (testset, learnweight), testResults, iterationNumber)
File "/home/dax5/orange/orngTest.py", line 411, in testOnData
testResults=ExperimentResults(1, [l.name for l in classifiers], testset.domain.classVar.values.native(), testweight!=0, testset.domain.classVar.baseValue)
AttributeError: 'FloatVariable' has no attribute 'values'

Return to Questions & Support



cron