/** * prints all the options to stdout */ protected static void printOptions(OptionHandler o) { Enumeration<Option> enm = o.listOptions(); System.out.println("Options for " + o.getClass().getName() + ":\n"); while (enm.hasMoreElements()) { Option option = enm.nextElement(); System.out.println(option.synopsis()); System.out.println(option.description()); } }
/** * prints all the options to stdout */ protected static void printOptions(OptionHandler o) { Enumeration<Option> enm = o.listOptions(); System.out.println("Options for " + o.getClass().getName() + ":\n"); while (enm.hasMoreElements()) { Option option = enm.nextElement(); System.out.println(option.synopsis()); System.out.println(option.description()); } }
/** * 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.addAll(Collections.list(super.listOptions())); result.add(new Option("\tFull name of the classifier analysed.\n" + "\teg: weka.classifiers.bayes.NaiveBayes\n" + "\t(default weka.classifiers.rules.ZeroR)", "W", 1, "-W")); if ((m_Classifier != null) && (m_Classifier instanceof OptionHandler)) { result.add(new Option("", "", 0, "\nOptions specific to classifier " + m_Classifier.getClass().getName() + ":")); result.addAll(Collections.list(((OptionHandler) m_Classifier) .listOptions())); } return result.elements(); }
/** * 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.addAll(Collections.list(super.listOptions())); result.addElement(new Option("\tFull name of the OptionHandler analysed.\n" + "\teg: weka.classifiers.rules.ZeroR\n" + "\t(default weka.classifiers.rules.ZeroR)", "W", 1, "-W")); if (m_OptionHandler != null) { result.addElement(new Option("", "", 0, "\nOptions specific to option handler " + m_OptionHandler.getClass().getName() + ":")); result.addAll(Collections.list(m_OptionHandler.listOptions())); } return result.elements(); }
/** * 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("\tFull name of the kernel analysed.\n" + "\teg: weka.classifiers.functions.supportVector.RBFKernel\n" + "\t(default weka.classifiers.functions.supportVector.RBFKernel)", "W", 1, "-W")); result.addAll(Collections.list(super.listOptions())); if ((m_Kernel != null) && (m_Kernel instanceof OptionHandler)) { result.addElement(new Option("", "", 0, "\nOptions specific to kernel " + m_Kernel.getClass().getName() + ":")); result.addAll(Collections.list(((OptionHandler) m_Kernel).listOptions())); } return result.elements(); }
/** * 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("\tFull name of base associator.\n" + "\t(default: " + defaultAssociatorString() + ")", "W", 1, "-W")); if (m_Associator instanceof OptionHandler) { result.addElement(new Option("", "", 0, "\nOptions specific to associator " + m_Associator.getClass().getName() + ":")); result.addAll(Collections.list(((OptionHandler) m_Associator) .listOptions())); } return result.elements(); }
/** * 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.addAll(Collections.list(super.listOptions())); result.add(new Option("\tFull name of the associator analysed.\n" + "\teg: weka.associations.Apriori\n" + "\t(default weka.associations.Apriori)", "W", 1, "-W")); if ((m_Associator != null) && (m_Associator instanceof OptionHandler)) { result.add(new Option("", "", 0, "\nOptions specific to associator " + m_Associator.getClass().getName() + ":")); result.addAll(Collections.list(((OptionHandler) m_Associator) .listOptions())); } return result.elements(); }
/** * 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("\tFull name of the clusterer analyzed.\n" + "\teg: weka.clusterers.SimpleKMeans\n" + "\t(default weka.clusterers.SimpleKMeans)", "W", 1, "-W")); result.addAll(Collections.list(super.listOptions())); if ((m_Clusterer != null) && (m_Clusterer instanceof OptionHandler)) { result.addElement(new Option("", "", 0, "\nOptions specific to clusterer " + m_Clusterer.getClass().getName() + ":")); result.addAll(Collections.list(((OptionHandler) m_Clusterer) .listOptions())); } return result.elements(); }
/** * 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.addAll(Collections.list(super.listOptions())); result.add(new Option("\tFull name of the associator analysed.\n" + "\teg: weka.associations.Apriori\n" + "\t(default weka.associations.Apriori)", "W", 1, "-W")); if ((m_Associator != null) && (m_Associator instanceof OptionHandler)) { result.add(new Option("", "", 0, "\nOptions specific to associator " + m_Associator.getClass().getName() + ":")); result.addAll(Collections.list(((OptionHandler) m_Associator) .listOptions())); } return result.elements(); }
/** * 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.addAll(Collections.list(super.listOptions())); result.addElement(new Option("\tFull name of the OptionHandler analysed.\n" + "\teg: weka.classifiers.rules.ZeroR\n" + "\t(default weka.classifiers.rules.ZeroR)", "W", 1, "-W")); if (m_OptionHandler != null) { result.addElement(new Option("", "", 0, "\nOptions specific to option handler " + m_OptionHandler.getClass().getName() + ":")); result.addAll(Collections.list(m_OptionHandler.listOptions())); } return result.elements(); }
/** * 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("\tFull name of base associator.\n" + "\t(default: " + defaultAssociatorString() + ")", "W", 1, "-W")); if (m_Associator instanceof OptionHandler) { result.addElement(new Option("", "", 0, "\nOptions specific to associator " + m_Associator.getClass().getName() + ":")); result.addAll(Collections.list(((OptionHandler) m_Associator) .listOptions())); } return result.elements(); }
/** * 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.addAll(Collections.list(super.listOptions())); result.add(new Option("\tFull name of the classifier analysed.\n" + "\teg: weka.classifiers.bayes.NaiveBayes\n" + "\t(default weka.classifiers.rules.ZeroR)", "W", 1, "-W")); if ((m_Classifier != null) && (m_Classifier instanceof OptionHandler)) { result.add(new Option("", "", 0, "\nOptions specific to classifier " + m_Classifier.getClass().getName() + ":")); result.addAll(Collections.list(((OptionHandler) m_Classifier) .listOptions())); } return result.elements(); }
/** * 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("\tFull name of base clusterer.\n" + "\t(default: " + defaultClustererString() + ")", "W", 1, "-W")); result.addAll(Collections.list(super.listOptions())); if (m_Clusterer instanceof OptionHandler) { result.addElement(new Option("", "", 0, "\nOptions specific to clusterer " + m_Clusterer.getClass().getName() + ":")); result.addAll(Collections.list(((OptionHandler) m_Clusterer) .listOptions())); } return result.elements(); }
/** * 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("\tFull name of base clusterer.\n" + "\t(default: " + defaultClustererString() + ")", "W", 1, "-W")); result.addAll(Collections.list(super.listOptions())); if (m_Clusterer instanceof OptionHandler) { result.addElement(new Option("", "", 0, "\nOptions specific to clusterer " + m_Clusterer.getClass().getName() + ":")); result.addAll(Collections.list(((OptionHandler) m_Clusterer) .listOptions())); } return result.elements(); }
/** * 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>(1); newVector.addElement(new Option( "\tPartition generator to use, including options.\n" + "\tQuotes are needed when options are specified.\n" + "\t(default: weka.classifiers.trees.J48)", "P", 1, "-P \"<name and options of partition generator>\"")); newVector.addAll(Collections.list(super.listOptions())); newVector.addElement(new Option("", "", 0, "\nOptions specific to partition generator " + getPartitionGenerator().getClass().getName() + ":")); newVector.addAll(Collections.list(((OptionHandler) getPartitionGenerator()) .listOptions())); return newVector.elements(); }
/** * generates the options string. * * @return the options string * @throws Exception in case the generation fails */ public String generate() throws Exception { StringBuffer result; OptionHandler handler; Enumeration<Option> enm; Option option; result = new StringBuffer(); handler = (OptionHandler) Utils.forName(null, getClassname(), new String[0]); enm = handler.listOptions(); while (enm.hasMoreElements()) { option = enm.nextElement(); result.append(option.synopsis() + '\n'); result.append(option.description() + "\n"); } return result.toString(); }
/** * generates the options string. * * @return the options string * @throws Exception in case the generation fails */ public String generate() throws Exception { StringBuffer result; OptionHandler handler; Enumeration<Option> enm; Option option; result = new StringBuffer(); handler = (OptionHandler) Utils.forName(null, getClassname(), new String[0]); enm = handler.listOptions(); while (enm.hasMoreElements()) { option = enm.nextElement(); result.append(option.synopsis() + '\n'); result.append(option.description() + "\n"); } return result.toString(); }
/** * Gets 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( "\tThe PLS filter to use. Full classname of filter to include, " + "\tfollowed by scheme options.\n" + "\t(default: weka.filters.supervised.attribute.PLSFilter)", "filter", 1, "-filter <filter specification>")); result.addAll(Collections.list(super.listOptions())); if (getFilter() instanceof OptionHandler) { result.addElement(new Option("", "", 0, "\nOptions specific to filter " + getFilter().getClass().getName() + " ('-filter'):")); result.addAll(Collections.list(((OptionHandler) getFilter()) .listOptions())); } return result.elements(); }
/** * Returns an enumeration describing the available options. * * @return an enumeration of all the available options. */ public Enumeration<Option> listOptions() { Vector<Option> newVector = new Vector<Option>(2); newVector.addElement(new Option(metaOption(), "M", 0, "-M <scheme specification>")); newVector.addElement(new Option("\tSets the number of cross-validation folds.", "X", 1, "-X <number of folds>")); newVector.addAll(Collections.list(super.listOptions())); if (getMetaClassifier() instanceof OptionHandler) { newVector.addElement(new Option("", "", 0, "\nOptions specific to meta classifier " + getMetaClassifier().getClass().getName() + ":")); newVector.addAll(Collections.list(((OptionHandler) getMetaClassifier()).listOptions())); } return newVector.elements(); }
/** * Returns an enumeration describing the available options. * * @return an enumeration of all the available options. */ public Enumeration<Option> listOptions() { Vector<Option> newVector = new Vector<Option>(3); newVector.addElement(new Option( "\tFull name of base classifier.\n" + "\t(default: " + defaultClassifierString() + ((defaultClassifierOptions().length > 0) ? " with options " + Utils.joinOptions(defaultClassifierOptions()) + ")" : ")"), "W", 1, "-W <classifier name>")); newVector.addAll(Collections.list(super.listOptions())); newVector.addElement(new Option( "", "", 0, "\nOptions specific to classifier " + m_Classifier.getClass().getName() + ":")); newVector.addAll(Collections.list(((OptionHandler)m_Classifier).listOptions())); return newVector.elements(); }