source: orange/Orange/testing/regression/tests_20/modules_tree2.py @ 9952:986e9cd806f4

Revision 9952:986e9cd806f4, 498 bytes checked in by Miha Stajdohar <miha.stajdohar@…>, 2 years ago (diff)

Tests moved and renamed from orange 20.

Line 
1# Author:      J Zabkar
2# Version:     1.0
3# Description: Pre-prunning of classification tree using orngTree module
4# Category:    modelling
5# Uses:        iris.tab
6# Referenced:   orngTree.htm
7
8import orange, orngTree
9data = orange.ExampleTable("iris.tab")
10
11print "BIG TREE:"
12tree1 = orngTree.TreeLearner(data)
13orngTree.printTree(tree1, leafStr="%m", nodeStr=".")
14
15print "\nPRE-PRUNED TREE:"
16tree2 = orngTree.TreeLearner(data, maxMajority=0.7)
17orngTree.printTree(tree2, leafStr="%m", nodeStr=".")
Note: See TracBrowser for help on using the repository browser.