class Scoring_AUC_Test(unittest.TestCase):
def test_tree(self):
data = Orange.data.Table("iris")
tree = Orange.classification.TreeLearner()
res = Orange.evaluation.CrossValidation(data, [tree], k=2)
self.assertTrue(0.8 < AUC(res)[0] < 1.)
After Change
tree = Orange.classification.TreeLearner()
res = Orange.evaluation.CrossValidation(self.iris, [tree], k=2)
self.assertGreater(AUC(res)[0], 0.8)
self.assertLess(AUC(res)[0], 1.)
def test_constant_prob(self):
maj = Orange.classification.MajorityLearner()
res = Orange.evaluation.TestOnTrainingData(self.iris, [maj])