python/test: Dump classification tree to text file too.
authorJosé Fonseca <jfonseca@vmware.com>
Tue, 31 Mar 2009 17:38:48 +0000 (18:38 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 31 Mar 2009 17:38:48 +0000 (18:38 +0100)
src/gallium/state_trackers/python/tests/base.py
src/gallium/state_trackers/python/tests/tree.py

index 6b2e702955f641597e79ef28ceb55737dce40a49..1fa7fe6f3b3235aeaa5d6edd59e28c186fb07d6c 100755 (executable)
@@ -331,4 +331,6 @@ class TestResult:
 
         orngTree.printTxt(tree, maxDepth=4)
 
+        file(name+'.txt', 'wt').write(orngTree.dumpTree(tree))
+
         orngTree.printDot(tree, fileName=name+'.dot', nodeShape='ellipse', leafShape='box')
index 14b3599c6d7a82d56ef5706936267257fca3d199..0c1bcda4cf28dcd3c829101d3bc19e5349075a53 100755 (executable)
@@ -18,4 +18,6 @@ for arg in sys.argv[1:]:
 
     orngTree.printTxt(tree)
 
+    file(name+'.txt', 'wt').write(orngTree.dumpTree(tree) + '\n')
+
     orngTree.printDot(tree, fileName=name+'.dot', nodeShape='ellipse', leafShape='box')