progs/gallium/python: New home for python statetracker scripts.

This commit is contained in:
José Fonseca
2010-02-14 11:15:19 +00:00
parent 0a3e362175
commit 50812e633f
79 changed files with 2 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
#!/usr/bin/env python
#
# See also:
# http://www.ailab.si/orange/doc/ofb/c_otherclass.htm
import os.path
import sys
import orange
import orngTree
for arg in sys.argv[1:]:
name, ext = os.path.splitext(arg)
data = orange.ExampleTable(arg)
tree = orngTree.TreeLearner(data, sameMajorityPruning=1, mForPruning=2)
orngTree.printTxt(tree)
file(name+'.txt', 'wt').write(orngTree.dumpTree(tree) + '\n')
orngTree.printDot(tree, fileName=name+'.dot', nodeShape='ellipse', leafShape='box')