コード例 #1
0
ファイル: RipperRule.java プロジェクト: triguero/Keel3.0
  /**
   * Prints this rule
   *
   * @param classAttr the class attribute in the data
   * @return a textual description of this rule
   */
  public String toString(AttributeWeka classAttr) {
    StringBuffer text = new StringBuffer();
    if (m_Antds.size() > 0) {
      for (int j = 0; j < (m_Antds.size() - 1); j++)
        text.append("(" + ((Antd) (m_Antds.elementAt(j))).toString() + ") and ");
      text.append("(" + ((Antd) (m_Antds.lastElement())).toString() + ")");
    }
    text.append(" => " + classAttr.name() + "=" + classAttr.value((int) m_Consequent));

    return text.toString();
  }
コード例 #2
0
ファイル: RipperRule.java プロジェクト: triguero/Keel3.0
 public double getConfidence() {
   if (!hasAntds()) return Double.NaN;
   return ((Antd) m_Antds.lastElement()).m_confidence;
 }