@Override public String toString(){
  StringBuffer text=new StringBuffer();
  Rule temp;
  if (m_ruleSet == null) {
    return "Classifier hasn't been built yet!";
  }
  if (m_generateRules) {
    text.append("M5 " + ((m_useUnpruned == true) ? "unpruned " : "pruned ") + ((m_regressionTree == true) ? "regression " : "model ")+ "rules ");
    if (!m_unsmoothedPredictions) {
      text.append("\n(using smoothed linear models) ");
    }
    text.append(":\n");
    text.append("Number of Rules : " + m_ruleSet.size() + "\n\n");
    for (int j=0; j < m_ruleSet.size(); j++) {
      temp=m_ruleSet.get(j);
      text.append("Rule: " + (j + 1) + "\n");
      text.append(temp.toString());
    }
  }
 else {
    temp=m_ruleSet.get(0);
    text.append(temp.toString());
  }
  return text.toString();
}

@ Override public String toString ( ) { StringBuffer text = new StringBuffer ( ) ; Rule temp ; if ( m_ruleSet == null ) { return "Classifier hasn't been built yet!" ; } if ( m_generateRules ) { text . append ( "M5 " + ( ( m_useUnpruned == true ) ? "unpruned " : "pruned " ) + ( ( m_regressionTree == true ) ? "regression " : "model " ) + "rules " ) ; if ( ! m_unsmoothedPredictions ) { text . append ( "\n(using smoothed linear models) " ) ; } text . append ( ":\n" ) ; text . append ( "Number of Rules : " + m_ruleSet . size ( ) + "\n\n" ) ; for ( int j = 0 ; j < m_ruleSet . size ( ) ; j ++ ) { temp = m_ruleSet . get ( j ) ; text . append ( "Rule: " + ( j + 1 ) + "\n" ) ; text . append ( temp . toString ( ) ) ; } } else { temp = m_ruleSet . get ( 0 ) ; text . append ( temp . toString ( ) ) ; } return text . toString ( ) ; }
returns a description of the classifier
