Example usage for org.apache.commons.cli2.builder DefaultOptionBuilder DefaultOptionBuilder

List of usage examples for org.apache.commons.cli2.builder DefaultOptionBuilder DefaultOptionBuilder

Introduction

In this page you can find the example usage for org.apache.commons.cli2.builder DefaultOptionBuilder DefaultOptionBuilder.

Prototype

public DefaultOptionBuilder() 

Source Link

Document

Creates a new DefaultOptionBuilder using defaults

Usage

From source file:org.apache.mahout.common.commandline.DefaultOptionCreator.java

/**
 * Returns a default command line option for specification of T2. Used by
 * Canopy, MeanShift//from  www. j a  v a2 s.  co m
 */
public static DefaultOptionBuilder t2Option() {
    return new DefaultOptionBuilder().withLongName(T2_OPTION).withRequired(true)
            .withArgument(new ArgumentBuilder().withName(T2_OPTION).withMinimum(1).withMaximum(1).create())
            .withDescription("T2 threshold value").withShortName(T2_OPTION);
}

From source file:org.apache.mahout.common.commandline.DefaultOptionCreator.java

/**
 * Returns a default command line option for specification of T3 (Reducer T1).
 * Used by Canopy/*from   w w w .  ja  va  2  s.com*/
 */
public static DefaultOptionBuilder t3Option() {
    return new DefaultOptionBuilder().withLongName(T3_OPTION).withRequired(false)
            .withArgument(new ArgumentBuilder().withName(T3_OPTION).withMinimum(1).withMaximum(1).create())
            .withDescription("T3 (Reducer T1) threshold value").withShortName(T3_OPTION);
}

From source file:org.apache.mahout.common.commandline.DefaultOptionCreator.java

/**
 * Returns a default command line option for specification of T4 (Reducer T2).
 * Used by Canopy/*from   w w  w.  java  2  s .  c om*/
 */
public static DefaultOptionBuilder t4Option() {
    return new DefaultOptionBuilder().withLongName(T4_OPTION).withRequired(false)
            .withArgument(new ArgumentBuilder().withName(T4_OPTION).withMinimum(1).withMaximum(1).create())
            .withDescription("T4 (Reducer T2) threshold value").withShortName(T4_OPTION);
}

From source file:org.apache.mahout.common.commandline.DefaultOptionCreator.java

/**
* @return a DefaultOptionBuilder for the clusterFilter option
*///from   w  ww  .j a  va  2s.c o  m
public static DefaultOptionBuilder clusterFilterOption() {
    return new DefaultOptionBuilder().withLongName(CLUSTER_FILTER_OPTION).withShortName("cf")
            .withRequired(false)
            .withArgument(new ArgumentBuilder().withName(CLUSTER_FILTER_OPTION).withMinimum(1).withMaximum(1)
                    .create())
            .withDescription("Cluster filter suppresses small canopies from mapper")
            .withShortName(CLUSTER_FILTER_OPTION);
}

From source file:org.apache.mahout.common.commandline.DefaultOptionCreator.java

/**
 * Returns a default command line option for specification of max number of
 * iterations. Used by Dirichlet, FuzzyKmeans, Kmeans, LDA
 *//*from   w ww . j av a 2  s.c o  m*/
public static DefaultOptionBuilder maxIterationsOption() {
    // default value used by LDA which overrides withRequired(false)
    return new DefaultOptionBuilder().withLongName(MAX_ITERATIONS_OPTION).withRequired(true).withShortName("x")
            .withArgument(new ArgumentBuilder().withName(MAX_ITERATIONS_OPTION).withDefault("-1").withMinimum(1)
                    .withMaximum(1).create())
            .withDescription("The maximum number of iterations.");
}

From source file:org.apache.mahout.common.commandline.DefaultOptionCreator.java

/**
 * Returns a default command line option for specification of numbers of
 * clusters to create. Used by Dirichlet, FuzzyKmeans, Kmeans
 *///from  ww w  .  ja v a 2 s .  c om
public static DefaultOptionBuilder numClustersOption() {
    return new DefaultOptionBuilder().withLongName(NUM_CLUSTERS_OPTION).withRequired(false)
            .withArgument(new ArgumentBuilder().withName("k").withMinimum(1).withMaximum(1).create())
            .withDescription("The number of clusters to create").withShortName("k");
}

From source file:org.apache.mahout.common.commandline.DefaultOptionCreator.java

public static DefaultOptionBuilder useSetRandomSeedOption() {
    return new DefaultOptionBuilder().withLongName(RANDOM_SEED).withRequired(false)
            .withArgument(new ArgumentBuilder().withName(RANDOM_SEED).create())
            .withDescription("Seed to initaize Random Number Generator with").withShortName("rs");
}

From source file:org.apache.mahout.common.commandline.DefaultOptionCreator.java

/**
 * Returns a default command line option for convergence delta specification.
 * Used by FuzzyKmeans, Kmeans, MeanShift
 *///  www  .j  a  v  a2s.  c  o  m
public static DefaultOptionBuilder convergenceOption() {
    return new DefaultOptionBuilder().withLongName(CONVERGENCE_DELTA_OPTION).withRequired(false)
            .withShortName("cd")
            .withArgument(new ArgumentBuilder().withName(CONVERGENCE_DELTA_OPTION).withDefault("0.5")
                    .withMinimum(1).withMaximum(1).create())
            .withDescription("The convergence delta value. Default is 0.5");
}

From source file:org.apache.mahout.common.commandline.DefaultOptionCreator.java

/**
 * Returns a default command line option for specifying the max number of
 * reducers. Used by Dirichlet, FuzzyKmeans, Kmeans and LDA
 * /*  w  w  w.j a  v  a2  s . c  o  m*/
 * @deprecated
 */
@Deprecated
public static DefaultOptionBuilder numReducersOption() {
    return new DefaultOptionBuilder().withLongName(MAX_REDUCERS_OPTION).withRequired(false).withShortName("r")
            .withArgument(new ArgumentBuilder().withName(MAX_REDUCERS_OPTION).withDefault("2").withMinimum(1)
                    .withMaximum(1).create())
            .withDescription("The number of reduce tasks. Defaults to 2");
}

From source file:org.apache.mahout.common.commandline.DefaultOptionCreator.java

/**
 * Returns a default command line option for clustering specification. Used by
 * all clustering except LDA//from w w  w .j  a  v  a 2  s. co m
 */
public static DefaultOptionBuilder clusteringOption() {
    return new DefaultOptionBuilder().withLongName(CLUSTERING_OPTION).withRequired(false)
            .withDescription("If present, run clustering after the iterations have taken place")
            .withShortName("cl");
}