Package weka.core

Examples of weka.core.Option


   * @return an enumeration of all the available options.
   */
  public Enumeration<Option> listOptions() {
    Vector<Option> newVector = new Vector<Option>();

    newVector.add(new Option("\tSet the fields to lag.", "F", 1,
        "-F <comma separated list of names>"));
    newVector.add(new Option("\tSet the fields to be considered "
        + "as overlay data.", "overlay", 1,
        "-overlay <comma separated list of names>"));

    newVector.add(new Option("\tSet the minimum lag length to generate."
        + "\n\t(default = 1)", "L", 1, "-L <num>"));
    newVector.add(new Option("\tSet the maximum lag length to generate."
        + "\n\t(default = 12)", "M", 1, "-M <num>"));
    newVector.add(new Option("\tAverage consecutive long lags.", "A", 0, "-A"));
    newVector.add(new Option("\tAverage those lags longer than this number of"
        + "time steps.\n\tUse in conjuction with -A is selected.\n\t"
        + "(default = 2)", "B", 1, "-B <num>"));
    newVector.add(new Option("\tFine tune selection of lags within min and "
        + "max by specifying" + " ranges", "R", 1, "-R <ranges>"));
    newVector.add(new Option("\tAverage this many consecutive long lags.\n\t"
        + "Use in conjuction with -B (default = 2)", "C", 1, "-C <num>"));
    newVector.add(new Option("\tDon't adjust for trends.", "Z", 0, "-Z"));
    newVector.add(new Option("\tSpecify the name of the timestamp field", "G",
        1, "-G <timestamp name>"));
    newVector.add(new Option("\tAdjust for variance.", "V", 0, "-V"));
    newVector.add(new Option(
        "\tAdd an AM/PM indicator (requires a date timestamp)", "am-pm", 0,
        "-am-pm"));
    newVector.add(new Option("\tAdd a day of the week field (requres a date"
        + " timestamp)", "dayofweek", 0, "-dayofweek"));
    newVector.add(new Option("\tAdd a day of the month field (requres a date"
        + " timestamp)", "dayofmonth", 0, "-dayofmonth"));
    newVector.add(new Option(
        "\tAdd a number of days in the month field (requres a date"
            + " timestamp)", "numdaysinmonth", 0, "-numdaysinmonth"));
    newVector.add(new Option(
        "\tAdd a weekend indicator (requires a date timestamp)", "weekend", 0,
        "-weekend"));
    newVector.add(new Option("\tAdd a month field (requires a date timestamp)",
        "month", 0, "-month"));
    newVector.add(new Option("\tAdd a quarter of the year field ("
        + "requires a date timestamp)", "quarter", 0, "-quarter"));
    newVector.add(new Option("\tAdd a custom date-derived boolean field ("
        + "requires a date timestamp).\n\tFormat: \"fieldName="
        + "Test Test|Test Test| ...\n\twhere "
        + "Test=OPERATORyear:month:week-of-yr:week-of-month:"
        + "day-of-yr:day-of-month:day-of-week:hour:min:second\n\te.g."
        + "XmasHoliday=>:dec::::24::: <:jan::::3:::\n\t"
        + "Legal OPERATORs are =,>,<,>=,<=. For = operator only\n\t"
        + "one Test is needed rather than a pair.\n\tThis option may"
        + " be specified more than once on the command line\n\t"
        + "in order to define multiple variables.", "custom", 1, "-custom"));
    newVector
        .add(new Option(
            "\tAdd a comma-separated 'skip' list of dates that should not\n\t"
                + "be considered as a time step. Days of the week,\n\t"
                + "months of the year, 'weekend', integers (indicating day of year\n\t"
                + ", hour of day etc.) or specific dates are all valid entries.\n\t"
                + "E.g sat,sun,27-08-2011,28-08-2011", "skip", 1, "-skip"));
View Full Code Here


      optionsText.append("\nOptions specific to "
          + forecaster.getClass().getName() + ":\n\n");

      Enumeration enu = ((OptionHandler) forecaster).listOptions();
      while (enu.hasMoreElements()) {
        Option option = (Option) enu.nextElement();
        optionsText.append(option.synopsis()).append("\n");
        optionsText.append(option.description()).append("\n");
      }
    }

    // Get global information (if available)
    if (globalInfo) {
View Full Code Here

   */
  public Enumeration listOptions() {

    Vector newVector = new Vector(4);

    newVector.addElement(new Option(
        "\tSpecify list of columns to translate in time. First and\n"
        + "\tlast are valid indexes. (default none)",
        "R", 1, "-R <index1,index2-index4,...>"));
    newVector.addElement(new Option(
        "\tInvert matching sense (i.e. calculate for all non-specified columns)",
        "V", 0, "-V"));
    newVector.addElement(new Option(
        "\tThe number of instances forward to translate values\n"
        + "\tbetween. A negative number indicates taking values from\n"
        + "\ta past instance. (default -1)",
        "I", 1, "-I <num>"));
    newVector.addElement(new Option(
        "\tFor instances at the beginning or end of the dataset where\n"
        + "\tthe translated values are not known, remove those instances\n"
        + "\t(default is to use missing values).",
        "M", 0, "-M"));

View Full Code Here

   * @return an enumeration of all the available options.
   */
  public Enumeration listOptions() {
   
    Vector newVector = new Vector(4);
    newVector.addElement(new Option("\tProduce debugging output.\n"
            + "\t(default no debugging output)",
            "D", 0, "-D"));
    newVector.addElement(new Option("\tSet the attribute selection method"
            + " to use. 1 = None, 2 = Greedy.\n"
            + "\t(default 0 = M5' method)",
            "S", 1, "-S <number of selection method>"));
    newVector.addElement(new Option("\tDo not try to eliminate colinear"
            + " attributes.\n",
            "C", 0, "-C"));
    newVector.addElement(new Option("\tSet ridge parameter (default 1.0e-8).\n",
            "R", 1, "-R <double>"));
    return newVector.elements();
  }
View Full Code Here

   * @return an enumeration of all the available options.
   */
  public Enumeration<Option> listOptions() {
    Vector<Option> newVector = new Vector<Option>();

    newVector.add(new Option("\tSet the fields to forecast.", "F", 1,
        "-F <comma separated list of names>"));
    newVector.add(new Option("\tSet the fields to be considered "
        + "as overlay data.", "overlay", 1,
        "-overlay <comma separated list of names>"));

    newVector.add(new Option("\tSet the minimum lag length to generate."
        + "\n\t(default = 1)", "L", 1, "-L <num>"));
    newVector.add(new Option("\tSet the maximum lag length to generate."
        + "\n\t(default = 12)", "M", 1, "-M <num>"));
    newVector.add(new Option("\tFine tune selection of lags within min and "
        + "max by specifying" + " ranges", "R", 1, "-R <ranges>"));
    newVector.add(new Option("\tAverage consecutive long lags.", "A", 0, "-A"));
    newVector.add(new Option("\tAverage those lags longer than this number of"
        + "time steps.\n\tUse in conjuction with -A.\n\t" + "(default = 2)",
        "B", 1, "-B <num>"));
    newVector.add(new Option("\tAverage this many consecutive long lags.\n\t"
        + "Use in conjuction with -B (default = 2)", "C", 1, "-C <num>"));
    newVector.add(new Option("\tDon't adjust for trends.", "Z", 0, "-Z"));
    newVector.add(new Option("\tSpecify the name of the timestamp field", "G",
        1, "-G <timestamp name>"));
    newVector.add(new Option("\tAdjust for variance.", "V", 0, "-V"));
    newVector.add(new Option("\tSpecify the primary periodic field, "
        + "\n\tif one exists already in the data "
        + "(e.g. day, month, quarter etc.\n\tIf there is more than"
        + "one such field, choose the one with the finest granularity.\n\t"
        + "This field must be" + "cyclic and declared as nominal.", "periodic",
        1, "-periodic <field name>"));
    newVector.add(new Option(
        "\tCalculate confidence limits for predictions\n\t"
            + "(based on errors) for up to, and including, "
            + "the specified\n\tnumber of time steps"
            + "into the future\n\t(default = 0 (don't compute conf. levels)).",
        "conf", 1, "-conf <num steps>"));
    newVector.add(new Option(
        "\tConfidence level for computing confidence limits.\n\t"
            + "Use in conjunction with -conf.\n\t(default = 0.95).", "P", 1,
        "-P <confidence level>"));
    newVector.add(new Option("\tSpecify the base regression scheme to use.\n\t"
        + "Supply a fully qualified name, along with options, enclosed in\n\t"
        + "quotes (e.g. \"weka.classifiers.functions.SMOreg -R 0.5\")."
        + "\n\t(default = weka.classifiers.functions.SMOreg)", "W", 1, "-W"));
    newVector.add(new Option(
        "\tAdd an AM/PM indicator (requires a date timestamp)", "am-pm", 0,
        "-am-pm"));
    newVector.add(new Option("\tAdd a day of the week field (requres a date"
        + " timestamp)", "day", 0, "-dayofweek"));
    newVector.add(new Option("\tAdd a day of the month field (requres a date"
        + " timestamp)", "dayofmonth", 0, "-dayofmonth"));
    newVector.add(new Option(
        "\tAdd a number of days in the month field (requres a date"
            + " timestamp)", "numdaysinmonth", 0, "-numdaysinmonth"));
    newVector.add(new Option(
        "\tAdd a weekend indicator (requires a date timestamp)", "weekend", 0,
        "-weekend"));
    newVector.add(new Option("\tAdd a month field (requires a date timestamp)",
        "month", 0, "-month"));
    newVector.add(new Option("\tAdd a quarter of the year field ("
        + "requires a date timestamp)", "quarter", 0, "-quarter"));

    newVector.add(new Option("\tAdd a custom date-derived boolean field ("
        + "requires a date timestamp).\n\tFormat: \"fieldName="
        + "Test Test|Test Test| ...\n\twhere "
        + "Test = OPERATORyear:month:week-of-yr:week-of-month:"
        + "day-of-yr:day-of-month:day-of-week:hour:min:second\n\te.g."
        + "XmasHoliday=>:dec::::24::: <:jan::::3:::\n\t"
        + "Legal OPERATORs are =,>,<,>=,<=. For = operator only\n\t"
        + "one Test is needed rather than a pair.\n\tThis option may"
        + " be specified more than once on the command line\n\t"
        + "in order to define multiple variables.", "custom", 1, "-custom"));
    newVector
        .add(new Option(
            "\tAdd a comma-separated 'skip' list of dates that should not\n\t"
                + "be considered as a time step. Days of the week,\n\t"
                + "months of the year, 'weekend', integers (indicating day of year\n\t"
                + ", hour of day etc.) or specific dates are all valid entries.\n\t"
                + "E.g sat,sun,27-08-2011,28-08-2011", "skip", 1, "-skip"));
View Full Code Here

   */ 
  public java.util.Enumeration listOptions() {
     
     Vector<Option> newVector = new Vector<Option>();

     newVector.addElement(new Option(
           "\tThe JDBC URL to connect to.\n"
           + "\t(default: from DatabaseUtils.props file)",
           "url", 1, "-url <JDBC URL>"));
    
     newVector.addElement(new Option(
           "\tThe user to connect with to the database.\n"
           + "\t(default: none)",
           "user", 1, "-user <name>"));
    
     newVector.addElement(new Option(
           "\tThe password to connect with to the database.\n"
           + "\t(default: none)",
           "password", 1, "-password <password>"));
    
     newVector.addElement(new Option(
           "\tThe name of the table.\n"
           + "\t(default: the relation name)",
           "T", 1, "-T <table name>"));
    
     newVector.addElement(new Option(
           "\tAdd an ID column as primary key. The name is specified\n"
           + "\tin the DatabaseUtils file ('idColumn'). The DatabaseLoader\n"
           + "\twon't load this column.",
           "P", 0, "-P"));
    
     newVector.add(new Option(
             "\tThe custom properties file to use instead of default ones,\n"
           + "\tcontaining the database parameters.\n"
           + "\t(default: none)",
           "custom-props", 1, "-custom-props <file>"));
    
     newVector.addElement(new Option(
           "\tInput file in arff format that should be saved in database.",
           "i", 1, "-i <input file name>"));
    
     return  newVector.elements();
  }
View Full Code Here

      try {
  DatabaseSaver asv = new DatabaseSaver();
        try {
          Enumeration enumi = asv.listOptions();
          while (enumi.hasMoreElements()) {
            Option option = (Option)enumi.nextElement();
            text.append(option.synopsis()+'\n');
            text.append(option.description()+'\n');
       
          asv.setOptions(options);
          asv.setDestination(asv.getUrl());
        } catch (Exception ex) {
            ex.printStackTrace();
View Full Code Here

   * @return an enumeration of all the available options
   */
  public Enumeration<Option> listOptions() {
    Vector<Option> newVector = new Vector<Option>(14);
   
    newVector.addElement(new Option(
        "\tSpecifies name of directory.",
        "l", 1, "-l <directory name>"));
    newVector.addElement(new Option(
        "\tSpecifies name of model.",
        "m", 1, "-m <model name>"));
    newVector.addElement(new Option(
        "\tSpecifies vocabulary name.",
        "v", 1, "-v <vocabulary name>"));
    newVector.addElement(new Option(
        "\tSpecifies vocabulary format (text or skos or none).",
        "f", 1, "-f <vocabulary format>"));
    newVector.addElement(new Option(
        "\tSpecifies document language (en (default), es, de, fr).",
        "i", 1, "-i <document language>"));
    newVector.addElement(new Option(
        "\tSpecifies encoding.",
        "e", 1, "-e <encoding>"));
    newVector.addElement(new Option(
        "\tTurns debugging mode on.",
        "d", 0, "-d"));
    newVector.addElement(new Option(
        "\tUse keyphrase frequency statistic.",
        "k", 0, "-k"));
    newVector.addElement(new Option(
        "\tDisallow internal periods.",
        "p", 0, "-p"));
    newVector.addElement(new Option(
        "\tSets the maximum phrase length (default: 5).",
        "x", 1, "-x <length>"));
    newVector.addElement(new Option(
        "\tSets the minimum phrase length (default: 1).",
        "y", 1, "-y <length>"));
    newVector.addElement(new Option(
        "\tSet the minimum number of occurences (default: 2).",
        "o", 1, "-o"));
    newVector.addElement(new Option(
        "\tSets the list of stopwords to use (default: StopwordsEnglish).",
        "s", 1, "-s <name of stopwords class>"));
    newVector.addElement(new Option(
        "\tSet the stemmer to use (default: SremovalStemmer).",
        "t", 1, "-t <name of stemmer class>"));
    newVector.addElement(new Option(
        "\tDo not check for proper nouns.",
        "n", 0, "-n"));
   
    return newVector.elements();
  }
View Full Code Here

      e.printStackTrace();
      log.error(e.getMessage());
      log.error("\nOptions:\n");
      Enumeration<Option> en = kmb.listOptions();
      while (en.hasMoreElements()) {
        Option option = en.nextElement();
        log.error(option.synopsis());
        log.error(option.description());
      }
    }
  }
View Full Code Here

   * @return an enumeration of all the available options
   */
  public Enumeration<Option> listOptions() {
    Vector<Option> newVector = new Vector<Option>(13);

    newVector.addElement(new Option("\tSpecifies name of directory.", "l", 1, "-l <directory name>"));
    newVector.addElement(new Option("\tSpecifies name of model.", "m", 1, "-m <model name>"));
    newVector.addElement(new Option("\tSpecifies vocabulary name.", "v", 1, "-v <vocabulary name>"));
    newVector.addElement(new Option("\tSpecifies vocabulary format.", "f", 1, "-f <vocabulary format>"));
    newVector.addElement(new Option("\tSpecifies encoding.", "e", 1, "-e <encoding>"));
    newVector.addElement(new Option("\tSpecifies document language (en (default), es, de, fr).", "i", 1,
        "-i <document language>"));
    newVector.addElement(new Option("\tSpecifies number of phrases to be output (default: 5).", "n", 1,
        "-n"));
    newVector.addElement(new Option("\tSet the stemmer to use (default: SremovalStemmer).", "t", 1,
        "-t <name of stemmer class>"));
    newVector.addElement(new Option("\tSet the stopwords class to use (default: EnglishStopwords).", "s",
        1, "-s <name of stopwords class>"));
    newVector.addElement(new Option("\tTurns debugging mode on.", "d", 0, "-d"));
    newVector.addElement(new Option(
        "\tBuilds global dictionaries for computing TFIDF from the test collection.", "b", 0, "-b"));
    newVector.addElement(new Option("\tAlso write stemmed phrase and score into \".key\" file.", "a", 0,
        "-a"));

    return newVector.elements();
  }
View Full Code Here

TOP

Related Classes of weka.core.Option

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.