org.apache.mahout.classifier.df.tools
Class TreeVisualizer

java.lang.Object
  extended by org.apache.mahout.classifier.df.tools.TreeVisualizer

public final class TreeVisualizer
extends Object

This tool is to visualize the Decision tree


Method Summary
static String[] predictTrace(Node tree, Data data, String[] attrNames)
          Predict trace to String
static void predictTracePrint(Node tree, Data data, String[] attrNames)
          Print predict trace
static void print(Node tree, Dataset dataset, String[] attrNames)
          Print Decision tree
static String toString(Node tree, Dataset dataset, String[] attrNames)
          Decision tree to String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toString

public static String toString(Node tree,
                              Dataset dataset,
                              String[] attrNames)
                       throws Exception
Decision tree to String

Parameters:
tree - Node of tree
dataset -
attrNames - attribute names
Throws:
Exception

print

public static void print(Node tree,
                         Dataset dataset,
                         String[] attrNames)
                  throws Exception
Print Decision tree

Parameters:
tree - Node of tree
dataset -
attrNames - attribute names
Throws:
Exception

predictTrace

public static String[] predictTrace(Node tree,
                                    Data data,
                                    String[] attrNames)
                             throws Exception
Predict trace to String

Parameters:
tree - Node of tree
data -
attrNames - attribute names
Throws:
Exception

predictTracePrint

public static void predictTracePrint(Node tree,
                                     Data data,
                                     String[] attrNames)
                              throws Exception
Print predict trace

Parameters:
tree - Node of tree
data -
attrNames - attribute names
Throws:
Exception


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.