public String graph() throws Exception {
  StringBuffer text=new StringBuffer();
  assignIDs(-1);
  assignLeafModelNumbers(0);
  text.append("digraph LMTree {\n");
  if (m_isLeaf) {
    text.append("N" + m_id + " [label=\"LM_"+ m_leafModelNum+ ":"+ getModelParameters()+ "\" "+ "shape=box style=filled");
    text.append("]\n");
  }
 else {
    text.append("N" + m_id + " [label=\""+ Utils.backQuoteChars(m_localModel.leftSide(m_train))+ "\" ");
    text.append("]\n");
    graphTree(text);
  }
  return text.toString() + "}\n";
}

public String graph ( ) throws Exception { StringBuffer text = new StringBuffer ( ) ; assignIDs ( - 1 ) ; assignLeafModelNumbers ( 0 ) ; text . append ( "digraph LMTree {\n" ) ; if ( m_isLeaf ) { text . append ( "N" + m_id + " [label=\"LM_" + m_leafModelNum + ":" + getModelParameters ( ) + "\" " + "shape=box style=filled" ) ; text . append ( "]\n" ) ; } else { text . append ( "N" + m_id + " [label=\"" + Utils . backQuoteChars ( m_localModel . leftSide ( m_train ) ) + "\" " ) ; text . append ( "]\n" ) ; graphTree ( text ) ; } return text . toString ( ) + "}\n" ; }
returns graph describing the tree .
