/** * Gets the current settings of the Classifier. * * @return an array of strings suitable for passing to setOptions */ public String [] getOptions() { Vector<String> options = new Vector<String>(); options.add("-B"); options.add("" + getNumBins()); if (getDeleteEmptyBins()) { options.add("-E"); } if (getUseEqualFrequency()) { options.add("-F"); } if (getMinimizeAbsoluteError()) { options.add("-A"); } options.add("-K"); if (getEstimator() instanceof OptionHandler) { options.add("" + getEstimator().getClass().getName() + " " + Utils.joinOptions(((OptionHandler)getEstimator()).getOptions())); } else { options.add("" + getEstimator().getClass().getName()); } Collections.addAll(options, super.getOptions()); return options.toArray(new String[0]); }
/** * Gets the current settings of the Classifier. * * @return an array of strings suitable for passing to setOptions */ public String [] getOptions() { Vector<String> options = new Vector<String>(); options.add("-B"); options.add("" + getNumBins()); if (getDeleteEmptyBins()) { options.add("-E"); } if (getUseEqualFrequency()) { options.add("-F"); } if (getMinimizeAbsoluteError()) { options.add("-A"); } options.add("-K"); if (getEstimator() instanceof OptionHandler) { options.add("" + getEstimator().getClass().getName() + " " + Utils.joinOptions(((OptionHandler)getEstimator()).getOptions())); } else { options.add("" + getEstimator().getClass().getName()); } Collections.addAll(options, super.getOptions()); return options.toArray(new String[0]); }
m_Discretizer.setAttributeIndices("" + (instances.classIndex() + 1)); m_Discretizer.setBins(getNumBins()); m_Discretizer.setUseEqualFrequency(getUseEqualFrequency()); m_Discretizer.setInputFormat(instances); Instances newTrain = Filter.useFilter(instances, m_Discretizer);
m_Discretizer.setAttributeIndices("" + (instances.classIndex() + 1)); m_Discretizer.setBins(getNumBins()); m_Discretizer.setUseEqualFrequency(getUseEqualFrequency()); m_Discretizer.setInputFormat(instances); Instances newTrain = Filter.useFilter(instances, m_Discretizer);