private String treeToString(){
  StringBuffer text=new StringBuffer();
  if (m_topOfTree == null) {
    return "Tree/Rule has not been built yet!";
  }
  text.append("M5 " + ((m_useUnpruned) ? "unpruned " : "pruned ") + ((m_regressionTree) ? "regression " : "model ")+ "tree:\n");
  if (m_smoothPredictions == true) {
    text.append("(using smoothed linear models)\n");
  }
  text.append(m_topOfTree.treeToString(0));
  text.append(m_topOfTree.printLeafModels());
  text.append("\nNumber of Rules : " + m_topOfTree.numberOfLinearModels());
  return text.toString();
}

private String treeToString ( ) { StringBuffer text = new StringBuffer ( ) ; if ( m_topOfTree == null ) { return "Tree/Rule has not been built yet!" ; } text . append ( "M5 " + ( ( m_useUnpruned ) ? "unpruned " : "pruned " ) + ( ( m_regressionTree ) ? "regression " : "model " ) + "tree:\n" ) ; if ( m_smoothPredictions == true ) { text . append ( "(using smoothed linear models)\n" ) ; } text . append ( m_topOfTree . treeToString ( 0 ) ) ; text . append ( m_topOfTree . printLeafModels ( ) ) ; text . append ( "\nNumber of Rules : " + m_topOfTree . numberOfLinearModels ( ) ) ; return text . toString ( ) ; }
return a description of the m5 tree
