Changeset 7170:fc441d712f5e in orange
 Timestamp:
 01/23/11 23:56:07 (3 years ago)
 Branch:
 default
 Convert:
 594378fbfd272804a74e9c042467f0fa5a2f8801
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

orange/OrangeWidgets/Evaluate/OWTestLearners.py
r7046 r7170 238 238 [("Method", self.resamplingMethods[self.resampling])] 239 239 + exset + 240 [("Target class", self.data.domain.classVar.values[self.targetClass])])240 ([("Target class", self.data.domain.classVar.values[self.targetClass])] if self.data else [])) 241 241 242 242 self.reportData(self.data) 243 244 self.reportSection("Results") 245 learners = [(l.time, l) for l in self.learners.values()] 246 learners.sort() 247 learners = [lt[1] for lt in learners] 248 usestat = [self.selectedRScores, self.selectedCScores][self.isclassification()] 249 250 res = "<table><tr><th></th>"+"".join("<th><b>%s</b></th>" % hr for hr in [s.label for i, s in enumerate(self.stat) if i in usestat])+"</tr>" 251 for i, l in enumerate(learners): 252 res += "<tr><th><b>%s</b></th>" % l.name 253 if l.scores: 254 for j in usestat: 255 scr = l.scores[j] 256 res += "<td>" + ("%.4f" % scr if scr is not None else "") + "</td>" 257 res += "</tr>" 258 res += "</table>" 259 self.reportRaw(res) 243 244 if self.data: 245 self.reportSection("Results") 246 learners = [(l.time, l) for l in self.learners.values()] 247 learners.sort() 248 learners = [lt[1] for lt in learners] 249 usestat = [self.selectedRScores, self.selectedCScores][self.isclassification()] 250 251 res = "<table><tr><th></th>"+"".join("<th><b>%s</b></th>" % hr for hr in [s.label for i, s in enumerate(self.stat) if i in usestat])+"</tr>" 252 for i, l in enumerate(learners): 253 res += "<tr><th><b>%s</b></th>" % l.name 254 if l.scores: 255 for j in usestat: 256 scr = l.scores[j] 257 res += "<td>" + ("%.4f" % scr if scr is not None else "") + "</td>" 258 res += "</tr>" 259 res += "</table>" 260 self.reportRaw(res) 260 261 261 262 def score(self, ids):
Note: See TracChangeset
for help on using the changeset viewer.