예제 #1
0
파일: J48.java 프로젝트: bigbigbug/wekax
 /**
  * Returns an enumeration of the additional measure names
  *
  * @return an enumeration of the measure names
  */
 public Enumeration enumerateMeasures() {
   Vector newVector = new Vector(3);
   newVector.addElement("measureTreeSize");
   newVector.addElement("measureNumLeaves");
   newVector.addElement("measureNumRules");
   return newVector.elements();
 }
예제 #2
0
파일: J48.java 프로젝트: bigbigbug/wekax
  /**
   * Returns an enumeration describing the available options.
   *
   * <p>Valid options are:
   *
   * <p>-U <br>
   * Use unpruned tree.
   *
   * <p>-C confidence <br>
   * Set confidence threshold for pruning. (Default: 0.25)
   *
   * <p>-M number <br>
   * Set minimum number of instances per leaf. (Default: 2)
   *
   * <p>-R <br>
   * Use reduced error pruning. No subtree raising is performed.
   *
   * <p>-N number <br>
   * Set number of folds for reduced error pruning. One fold is used as the pruning set. (Default:
   * 3)
   *
   * <p>-B <br>
   * Use binary splits for nominal attributes.
   *
   * <p>-S <br>
   * Don't perform subtree raising.
   *
   * <p>-L <br>
   * Do not clean up after the tree has been built.
   *
   * <p>-A <br>
   * If set, Laplace smoothing is used for predicted probabilites.
   *
   * <p>
   *
   * @return an enumeration of all the available options.
   */
  public Enumeration listOptions() {

    Vector newVector = new Vector(9);

    newVector.addElement(new Option("\tUse unpruned tree.", "U", 0, "-U"));
    newVector.addElement(
        new Option(
            "\tSet confidence threshold for pruning.\n" + "\t(default 0.25)",
            "C",
            1,
            "-C <pruning confidence>"));
    newVector.addElement(
        new Option(
            "\tSet minimum number of instances per leaf.\n" + "\t(default 2)",
            "M",
            1,
            "-M <minimum number of instances>"));
    newVector.addElement(new Option("\tUse reduced error pruning.", "R", 0, "-R"));
    newVector.addElement(
        new Option(
            "\tSet number of folds for reduced error\n"
                + "\tpruning. One fold is used as pruning set.\n"
                + "\t(default 3)",
            "N",
            1,
            "-N <number of folds>"));
    newVector.addElement(new Option("\tUse binary splits only.", "B", 0, "-B"));
    newVector.addElement(new Option("\tDon't perform subtree raising.", "S", 0, "-S"));
    newVector.addElement(
        new Option("\tDo not clean up after the tree has been built.", "L", 0, "-L"));
    newVector.addElement(
        new Option("\tLaplace smoothing for predicted probabilities.", "A", 0, "-A"));

    return newVector.elements();
  }
예제 #3
0
  /**
   * Returns an enumeration describing the available options
   *
   * @return an enumeration of all the available options
   */
  public Enumeration listOptions() {
    Vector newVector = new Vector(8);

    newVector.addElement(
        new Option("\tDesired size of ensemble.\n" + "\t(default 10)", "E", 1, "-E"));
    newVector.addElement(
        new Option(
            "\tFactor that determines number of artificial examples to generate.\n"
                + "\tSpecified proportional to training set size.\n"
                + "\t(default 1.0)",
            "R",
            1,
            "-R"));

    Enumeration enu = super.listOptions();
    while (enu.hasMoreElements()) {
      newVector.addElement(enu.nextElement());
    }
    return newVector.elements();
  }