/** * Gets the current settings of the classifier. * * @return an array of strings suitable for passing to setOptions */ @Override public String[] getOptions() { Vector<String> options = new Vector<String>(); Collections.addAll(options, super.getOptions()); if (!m_bUseADTree) { options.add("-D"); } if (m_otherBayesNet != null) { options.add("-B"); options.add(m_otherBayesNet.getFileName()); } options.add("-Q"); options.add("" + getSearchAlgorithm().getClass().getName()); options.add("--"); Collections.addAll(options, getSearchAlgorithm().getOptions()); options.add("-E"); options.add("" + getEstimator().getClass().getName()); options.add("--"); Collections.addAll(options, getEstimator().getOptions()); return options.toArray(new String[0]); } // getOptions
/** * Gets the current settings of the classifier. * * @return an array of strings suitable for passing to setOptions */ @Override public String[] getOptions() { Vector<String> options = new Vector<String>(); Collections.addAll(options, super.getOptions()); if (!m_bUseADTree) { options.add("-D"); } if (m_otherBayesNet != null) { options.add("-B"); options.add(m_otherBayesNet.getFileName()); } options.add("-Q"); options.add("" + getSearchAlgorithm().getClass().getName()); options.add("--"); Collections.addAll(options, getSearchAlgorithm().getOptions()); options.add("-E"); options.add("" + getEstimator().getClass().getName()); options.add("--"); Collections.addAll(options, getEstimator().getOptions()); return options.toArray(new String[0]); } // getOptions
/** * 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("\tDo not use ADTree data structure\n", "D", 0, "-D")); newVector.addElement(new Option("\tBIF file to compare with\n", "B", 1, "-B <BIF file>")); newVector.addElement(new Option("\tSearch algorithm\n", "Q", 1, "-Q weka.classifiers.bayes.net.search.SearchAlgorithm")); newVector.addElement(new Option("\tEstimator algorithm\n", "E", 1, "-E weka.classifiers.bayes.net.estimate.SimpleEstimator")); newVector.addAll(Collections.list(super.listOptions())); newVector.addElement(new Option("", "", 0, "\nOptions specific to search method " + getSearchAlgorithm().getClass().getName() + ":")); newVector.addAll(Collections.list(getSearchAlgorithm().listOptions())); newVector.addElement(new Option("", "", 0, "\nOptions specific to estimator method " + getEstimator().getClass().getName() + ":")); newVector.addAll(Collections.list(getEstimator().listOptions())); return newVector.elements(); } // listOptions
/** * 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("\tDo not use ADTree data structure\n", "D", 0, "-D")); newVector.addElement(new Option("\tBIF file to compare with\n", "B", 1, "-B <BIF file>")); newVector.addElement(new Option("\tSearch algorithm\n", "Q", 1, "-Q weka.classifiers.bayes.net.search.SearchAlgorithm")); newVector.addElement(new Option("\tEstimator algorithm\n", "E", 1, "-E weka.classifiers.bayes.net.estimate.SimpleEstimator")); newVector.addAll(Collections.list(super.listOptions())); newVector.addElement(new Option("", "", 0, "\nOptions specific to search method " + getSearchAlgorithm().getClass().getName() + ":")); newVector.addAll(Collections.list(getSearchAlgorithm().listOptions())); newVector.addElement(new Option("", "", 0, "\nOptions specific to estimator method " + getEstimator().getClass().getName() + ":")); newVector.addAll(Collections.list(getEstimator().listOptions())); return newVector.elements(); } // listOptions