source: orange/docs/tutorial/rst/code/ensemble-stacking.py @ 11052:c22077a09e63

Revision 11052:c22077a09e63, 564 bytes checked in by blaz <blaz.zupan@…>, 16 months ago (diff)

new tutorial

Line 
1import Orange
2
3data = Orange.data.Table("promoters")
4
5bayes = Orange.classification.bayes.NaiveLearner(name="bayes")
6tree = Orange.classification.tree.SimpleTreeLearner(name="tree")
7knn = Orange.classification.knn.kNNLearner(name="knn")
8
9base_learners = [bayes, tree, knn]
10stack = Orange.ensemble.stacking.StackedClassificationLearner(base_learners)
11
12learners = [stack, bayes, tree, knn]
13res = Orange.evaluation.testing.cross_validation(learners, data, 10)
14print "\n".join(["%8s: %5.3f" % (l.name, r) for r, l in zip(Orange.evaluation.scoring.AUC(res), learners)])
Note: See TracBrowser for help on using the repository browser.