本文整理汇总了Java中weka.core.Option类的典型用法代码示例。如果您正苦于以下问题:Java Option类的具体用法?Java Option怎么用?Java Option使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Option类属于weka.core包,在下文中一共展示了Option类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: listOptions
import weka.core.Option; //导入依赖的package包/类
/**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> newVector = new Vector<Option>(7);
newVector
.addElement(new Option("\tPopulation size", "L", 1, "-L <integer>"));
newVector.addElement(new Option("\tDescendant population size", "A", 1,
"-A <integer>"));
newVector
.addElement(new Option("\tNumber of runs", "U", 1, "-U <integer>"));
newVector.addElement(new Option("\tUse mutation.\n\t(default true)", "M",
0, "-M"));
newVector.addElement(new Option("\tUse cross-over.\n\t(default true)", "C",
0, "-C"));
newVector
.addElement(new Option(
"\tUse tournament selection (true) or maximum subpopulatin (false).\n\t(default false)",
"O", 0, "-O"));
newVector
.addElement(new Option("\tRandom number seed", "R", 1, "-R <seed>"));
newVector.addAll(Collections.list(super.listOptions()));
return newVector.elements();
}
示例2: main
import weka.core.Option; //导入依赖的package包/类
/**
* Executes the tests, use "-h" to list the commandline options.
*
* @param args the commandline parameters
* @throws Exception if something goes wrong
*/
public static void main(String[] args) throws Exception {
CheckSource check;
StringBuffer text;
Enumeration<Option> enm;
check = new CheckSource();
if (Utils.getFlag('h', args)) {
text = new StringBuffer();
text.append("\nHelp requested:\n\n");
enm = check.listOptions();
while (enm.hasMoreElements()) {
Option option = enm.nextElement();
text.append(option.synopsis() + "\n");
text.append(option.description() + "\n");
}
System.out.println("\n" + text + "\n");
} else {
check.setOptions(args);
if (check.execute()) {
System.out.println("Tests OK!");
} else {
System.out.println("Tests failed!");
}
}
}
示例3: listOptions
import weka.core.Option; //导入依赖的package包/类
/**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> newVector = new Vector<Option>(4);
newVector.addElement(new Option("\tTabu list length", "L", 1,
"-L <integer>"));
newVector
.addElement(new Option("\tNumber of runs", "U", 1, "-U <integer>"));
newVector.addElement(new Option("\tMaximum number of parents", "P", 1,
"-P <nr of parents>"));
newVector.addElement(new Option(
"\tUse arc reversal operation.\n\t(default false)", "R", 0, "-R"));
newVector.addAll(Collections.list(super.listOptions()));
return newVector.elements();
}
示例4: listOptions
import weka.core.Option; //导入依赖的package包/类
/**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> result = enumToVector(super.listOptions());
result.addElement(new Option("\tThe noise rate in percent (default "
+ defaultNoiseRate() + ").\n"
+ "\tCan be between 0% and 30%. (Remark: The original \n"
+ "\talgorithm only allows noise up to 10%.)", "P", 1, "-P <num>"));
result.addElement(new Option("\tA cluster definition of class '"
+ SubspaceClusterDefinition.class.getName().replaceAll(".*\\.", "")
+ "'\n" + "\t(definition needs to be quoted to be recognized as \n"
+ "\ta single argument).", "C", 1, "-C <cluster-definition>"));
result.addElement(new Option("", "", 0, "\nOptions specific to "
+ SubspaceClusterDefinition.class.getName() + ":"));
result.addAll(enumToVector(new SubspaceClusterDefinition(this)
.listOptions()));
return result.elements();
}
示例5: listOptions
import weka.core.Option; //导入依赖的package包/类
/**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> result = new Vector<Option>();
result
.addElement(new Option(
"\tWhen determining whether an edge exists a search is performed \n"
+ "\tfor a set Z that separates the nodes. MaxCardinality determines \n"
+ "\tthe maximum size of the set Z. This greatly influences the \n"
+ "\tlength of the search. (default 2)", "cardinality", 1,
"-cardinality <num>"));
result.addAll(Collections.list(super.listOptions()));
return result.elements();
}
示例6: listOptions
import weka.core.Option; //导入依赖的package包/类
/**
* Lists the available options
*
* @return an enumeration of the available options
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> result = new Vector<Option>();
result.add(new Option("\tEnables debug output.\n" + "\t(default: off)",
"D", 0, "-D"));
result.add(new Option("\tStores the filename in an additional attribute.\n"
+ "\t(default: off)", "F", 0, "-F"));
result.add(new Option("\tThe directory to work on.\n"
+ "\t(default: current directory)", "dir", 0, "-dir <directory>"));
result.add(new Option("\tThe character set to use, e.g UTF-8.\n\t"
+ "(default: use the default character set)", "charset", 1,
"-charset <charset name>"));
return result.elements();
}
示例7: listOptions
import weka.core.Option; //导入依赖的package包/类
/**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> newVector = new Vector<Option>(4);
newVector.addElement(new Option(
"\tSpecify the random number seed (default 1)", "S", 1, "-S <num>"));
newVector
.addElement(new Option(
"\tThe maximum class distribution spread.\n"
+ "\t0 = no maximum spread, 1 = uniform distribution, 10 = allow at most\n"
+ "\ta 10:1 ratio between the classes (default 0)", "M", 1,
"-M <num>"));
newVector.addElement(new Option(
"\tAdjust weights so that total weight per class is maintained.\n"
+ "\tIndividual instance weighting is not preserved. (default no\n"
+ "\tweights adjustment", "W", 0, "-W"));
newVector.addElement(new Option(
"\tThe maximum count for any class value (default 0 = unlimited).\n",
"X", 0, "-X <num>"));
return newVector.elements();
}
示例8: listOptions
import weka.core.Option; //导入依赖的package包/类
/**
* Returns an enumeration describing the available options..
*
* @return an enumeration of all the available options.
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> newVector = new Vector<Option>(2);
newVector.addElement(new Option(
"\tThe name of the database field to cache over.\n"
+ "\teg: \"Fold\" (default none)", "F", 1, "-F <field name>"));
newVector.addElement(new Option(
"\tThe full class name of a ResultProducer.\n"
+ "\teg: weka.experiment.CrossValidationResultProducer", "W", 1,
"-W <class name>"));
if ((m_ResultProducer != null)
&& (m_ResultProducer instanceof OptionHandler)) {
newVector.addElement(new Option("", "", 0,
"\nOptions specific to result producer "
+ m_ResultProducer.getClass().getName() + ":"));
newVector.addAll(Collections.list(((OptionHandler) m_ResultProducer)
.listOptions()));
}
return newVector.elements();
}
示例9: listOptions
import weka.core.Option; //导入依赖的package包/类
/**
* Returns an enumeration describing the available options
*
* @return an enumeration of all the available options
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> newVector = new Vector<Option>();
newVector.addElement(new Option(
"\tApplies a Markov Blanket correction to the network structure, \n"
+ "\tafter a network structure is learned. This ensures that all \n"
+ "\tnodes in the network are part of the Markov blanket of the \n"
+ "\tclassifier node.", "mbc", 0, "-mbc"));
newVector.addElement(new Option(
"\tScore type (LOO-CV,k-Fold-CV,Cumulative-CV)", "S", 1,
"-S [LOO-CV|k-Fold-CV|Cumulative-CV]"));
newVector.addElement(new Option(
"\tUse probabilistic or 0/1 scoring.\n\t(default probabilistic scoring)",
"Q", 0, "-Q"));
newVector.addAll(Collections.list(super.listOptions()));
return newVector.elements();
}
示例10: listOptions
import weka.core.Option; //导入依赖的package包/类
/**
* Returns an enumeration describing the available options..
*
* @return an enumeration of all the available options.
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> result = new Vector<Option>();
result.addElement(new Option(
"\tminimum allowable standard deviation for normal density computation "
+ "\n\t(default 1e-6)", "M", 1, "-M <num>"));
result.addElement(new Option("\tClusterer to wrap.\n" + "\t(default "
+ defaultClustererString() + ")", "W", 1, "-W <clusterer name>"));
result.addAll(Collections.list(super.listOptions()));
if ((m_wrappedClusterer != null)
&& (m_wrappedClusterer instanceof OptionHandler)) {
result.addElement(new Option("", "", 0,
"\nOptions specific to clusterer "
+ m_wrappedClusterer.getClass().getName() + ":"));
result.addAll(Collections.list(((OptionHandler) m_wrappedClusterer)
.listOptions()));
}
return result.elements();
}
示例11: listOptions
import weka.core.Option; //导入依赖的package包/类
/**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> result = new Vector<Option>(3);
result.addElement(new Option(
"\tThe minimum frequency for a value to remain (default: 2).\n", "-N", 1,
"-N <int>"));
result
.addElement(new Option(
"\tSets list of attributes to act on (or its inverse). 'first and 'last' are accepted as well.'\n"
+ "\tE.g.: first-5,7,9,20-last\n" + "\t(default: 1,2)", "R", 1,
"-R <range>"));
result
.addElement(new Option(
"\tInvert matching sense (i.e. act on all attributes not specified in list)",
"V", 0, "-V"));
result.addElement(new Option("\tUse short IDs for merged attribute values.", "S", 0, "-S"));
result.addAll(Collections.list(super.listOptions()));
return result.elements();
}
示例12: listOptions
import weka.core.Option; //导入依赖的package包/类
/**
* Returns an enumeration describing the available options
*
* @return an enumeration of all the available options
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> newVector = new Vector<Option>(4);
newVector.addElement(new Option("\tIndex of the attribute to be changed \n"
+ "\t(default last attribute)", "C", 1, "-C <col>"));
newVector.addElement(new Option(
"\tTreat missing values as an extra value \n", "M", 1, "-M"));
newVector.addElement(new Option(
"\tSpecify the percentage of noise introduced \n"
+ "\tto the data (default 10)", "P", 1, "-P <num>"));
newVector.addElement(new Option(
"\tSpecify the random number seed (default 1)", "S", 1, "-S <num>"));
return newVector.elements();
}
示例13: listOptions
import weka.core.Option; //导入依赖的package包/类
/**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> newVector = new Vector<Option>(2);
newVector.addElement(new Option(
"\tSpecifies list of instances to select. First and last\n"
+ "\tare valid indexes. (required)\n", "R", 1,
"-R <inst1,inst2-inst4,...>"));
newVector.addElement(new Option(
"\tSpecifies if inverse of selection is to be output.\n", "V", 0, "-V"));
return newVector.elements();
}
示例14: listOptions
import weka.core.Option; //导入依赖的package包/类
/**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> newVector =
Option.listOptionsForClassHierarchy(this.getClass(),
AbstractClassifier.class);
newVector.addElement(new Option(
"\tIf set, classifier is run in debug mode and\n"
+ "\tmay output additional info to the console", "output-debug-info",
0, "-output-debug-info"));
newVector
.addElement(new Option(
"\tIf set, classifier capabilities are not checked before classifier is built\n"
+ "\t(use with caution).", "-do-not-check-capabilities", 0,
"-do-not-check-capabilities"));
newVector.addElement(new Option(
"\tThe number of decimal places for the output of numbers in the model"
+ " (default " + m_numDecimalPlaces + ").", "num-decimal-places", 1,
"-num-decimal-places"));
return newVector.elements();
}
示例15: listOptions
import weka.core.Option; //导入依赖的package包/类
/**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> newVector = new Vector<Option>(3);
newVector.addElement(new Option(
"\tSets the attribute index (default last).", "C", 1, "-C <col>"));
newVector.addElement(new Option(
"\tSets the first value's index (default first).", "F", 1,
"-F <value index>"));
newVector.addElement(new Option(
"\tSets the second value's index (default last).", "S", 1,
"-S <value index>"));
return newVector.elements();
}