Ticket #224 (closed bug: fixed)

Opened 6 years ago

Last modified 3 years ago

test learners bug

Reported by: gregor Owned by: blaz
Milestone: 1.0 Component: canvas
Severity: minor Keywords:
Cc: ales Blocking:
Blocked By:

Description

File: OWTestLearners.py in line  452
      Function name: changedTarget
      Code: self.recomputeCM()
         File: OWTestLearners.py in line  287
         Function name: recomputeCM
         Code: cm = orngStat.computeConfusionMatrices(self.results, classIndex = self.targetClass)
            File: orngStat.py in line  608
            Function name: confusionMatrices
            Code: tfpns = [ConfusionMatrix() for i in range(res.numberOfLearners)]
            Exception type: <type 'exceptions.AttributeError'>
            Exception value: 'NoneType' object has no attribute 'numberOfLearners'

dobis ob klicu "debugWidgets.py simple-evaluate and bayes.pyw"

Change History

comment:1 Changed 6 years ago by anonymous

  • Owner changed from blaz to gregor

gregor, sem probal na svezi instalaciji, kjer pa ni datoteke bayes.pyw:

debugWidgets.py simple-evaluate and bayes.pyw

invalid file type for file simple-evaluate invalid file type for file and bayes.pyw Traceback (most recent call last):

File "debugOne.py", line 42, in <module>

f = open(guiName)

IOError: [Errno 2] No such file or directory: 'bayes.pyw' Finished. Status: OK

comment:2 Changed 6 years ago by gregor

  • Owner changed from gregor to blaz

Blaz, error, ki si ga dobil je posledica tega, da nisi dal imena skripte v narekovaje.

Kreiral sem nov test, ki uporablja samo file widget, bayesa ter test learners. klice se bayesTesting.pyw in je v WidgetDebugging. Ce ga pozenes z

debugWidgets.py bayesTesting.pyw dobis par exceptionov:

E:\Development\Orange-Qt4\orngStat.py:662: UserWarning: Can't compute specificity: one or both classes have no instances

warnings.warn("Can't compute specificity: one or both classes have no instances")

E:\Development\Orange-Qt4\orngStat.py:1288: DeprecationWarning: raising a string exception is deprecated

raise "Cannot compute AUC on a single-class problem"

Unhandled exception of type Cannot compute AUC on a single-class problem Traceback:

File: OWTestLearners.py in line 272 Function name: score Code: scores = [eval("orngStat." + s.f) for s in self.stat]

File: orngStat.py in line 1288 Function name: AUC Code: raise "Cannot compute AUC on a single-class problem" Exception type: Cannot compute AUC on a single-class problem Exception value: None

File: OWBaseWidget.py in line 554 Function name: processSignals Code: handler(value, (widgetFrom, nameFrom, id))

File: OWTestLearners.py in line 367 Function name: setLearner Code: self.recompute(True)

File: OWTestLearners.py in line 436 Function name: recompute Code: self.score([l.id for l in self.learners.values()])

File: OWTestLearners.py in line 252 Function name: score Code: times=self.pRepeat, callback=pb.advance, storeExamples = True)

File: orngTest.py in line 170 Function name: proportionTest Code: learnAndTestOnTestData(learners, (learnset, weight), (testset, weight), testResults, time, pps, argkw) Exception type: <type 'exceptions.UnboundLocalError'> Exception value: local variable 'testResults' referenced before assignment

comment:3 Changed 3 years ago by ales

  • Status changed from new to closed
  • Cc ales added
  • Resolution set to fixed

I fixed this in 2.0 in OWTestLearners.py revison 8829.

Note: See TracTickets for help on using tickets.