protected String toString(int level) {  try { StringBuffer text = new StringBuffer();  if (m_Attribute == -1) {   return leafString(); } else if (m_Info.attribute(m_Attribute).isNominal()) {   for (int i = 0; i < m_Successors.length; i++) { text.append("\n"); for (int j = 0; j < level; j++) { text.append("|   "); } text.append(m_Info.attribute(m_Attribute).name() + " = " + m_Info.attribute(m_Attribute).value(i)); text.append(m_Successors[i].toString(level + 1)); } } else {   text.append("\n"); for (int j = 0; j < level; j++) { text.append("|   "); } text.append(m_Info.attribute(m_Attribute).name() + " < " + Utils.doubleToString(m_SplitPoint, 2)); text.append(m_Successors[0].toString(level + 1)); text.append("\n"); for (int j = 0; j < level; j++) { text.append("|   "); } text.append(m_Info.attribute(m_Attribute).name() + " >= " + Utils.doubleToString(m_SplitPoint, 2)); text.append(m_Successors[1].toString(level + 1)); }  return text.toString(); } catch (Exception e) { e.printStackTrace(); return "RandomTree: tree can't be printed";
public String toString() {  if (m_Successors == null) { return "RandomTree: no model has been built yet."; } else { return "\nRandomTree\n==========\n" + toString(0) + "\n" + "\nSize of the tree : " + numNodes();
  protected String toString(int level) {    try {      StringBuffer text = new StringBuffer();            if (m_Attribute == -1) {		// Output leaf info	return leafString();      } else if (m_Info.attribute(m_Attribute).isNominal()) {		// For nominal attributes	for (int i = 0; i < m_Successors.length; i++) {	  text.append("\n");	  for (int j = 0; j < level; j++) {	    text.append("|   ");	  }	  text.append(m_Info.attribute(m_Attribute).name() + " = " +		      m_Info.attribute(m_Attribute).value(i));	  text.append(m_Successors[i].toString(level + 1));	}      } else {		// For numeric attributes	text.append("\n");	for (int j = 0; j < level; j++) {	  text.append("|   ");	}	text.append(m_Info.attribute(m_Attribute).name() + " < " +		    Utils.doubleToString(m_SplitPoint, 2));	text.append(m_Successors[0].toString(level + 1));	text.append("\n");	for (int j = 0; j < level; j++) {	  text.append("|   ");	}	text.append(m_Info.attribute(m_Attribute).name() + " >= " +		    Utils.doubleToString(m_SplitPoint, 2));	text.append(m_Successors[1].toString(level + 1));      }            return text.toString();    } catch (Exception e) {      e.printStackTrace();      return "RandomTree: tree can't be printed";    }  }     