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

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

new tutorial

Line 
1import Orange
2
3data = Orange.data.Table("promoters")
4
5tree = Orange.classification.tree.TreeLearner(m_pruning=2, name="tree")
6boost = Orange.ensemble.boosting.BoostedLearner(tree, name="boost")
7bagg = Orange.ensemble.bagging.BaggedLearner(tree, name="bagg")
8
9learners = [tree, boost, bagg]
10results = Orange.evaluation.testing.cross_validation(learners, data, folds=10)
11for l, s in zip(learners, Orange.evaluation.scoring.AUC(results)):
12    print "%5s: %.2f" % (l.name, s)
Note: See TracBrowser for help on using the repository browser.