Ticket #1022: tree_random.py

File tree_random.py, 279 bytes (added by jurezb, 2 years ago)
Line 
1import Orange
2
3data = Orange.data.Table('iris')
4rgen = Orange.core.RandomGenerator(42)
5l = Orange.classification.tree.SimpleTreeLearner(skip_prob=0.5, random_generator=rgen)
6
7res = Orange.evaluation.testing.cross_validation([l], data)
8print(Orange.evaluation.scoring.CA(res)[0])