source: orange/orange/doc/modules/tree2.py @ 6538:a5f65d7f0b2c

Revision 6538:a5f65d7f0b2c, 498 bytes checked in by Mitar <Mitar@…>, 4 years ago (diff)

Made XPM version of the icon 32x32.

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.