/** * Outputs the decision tree as a graph * * @return the tree as a graph * @throws Exception if generation fails */ @Override public String graph() throws Exception { if (m_Tree == null) { throw new Exception("REPTree: No model built yet."); } StringBuffer resultBuff = new StringBuffer(); m_Tree.toGraph(resultBuff, 0, null); String result = "digraph Tree {\n" + "edge [style=bold]\n" + resultBuff.toString() + "\n}\n"; return result; }
/** * Outputs the decision tree as a graph * * @return the tree as a graph * @throws Exception if generation fails */ @Override public String graph() throws Exception { if (m_Tree == null) { throw new Exception("REPTree: No model built yet."); } StringBuffer resultBuff = new StringBuffer(); m_Tree.toGraph(resultBuff, 0, null); String result = "digraph Tree {\n" + "edge [style=bold]\n" + resultBuff.toString() + "\n}\n"; return result; }
num = m_Successors[i].toGraph(text, num, this);
num = m_Successors[i].toGraph(text, num, this);