/** * 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("\tnumber of clusters. (default = 2).", "N", 1, "-N <num>")); result.addAll(Collections.list(super.listOptions())); return result.elements(); }
/** * Gets the current settings of FarthestFirst * * @return an array of strings suitable for passing to setOptions() */ @Override public String[] getOptions() { Vector<String> result = new Vector<String>(); result.add("-N"); result.add("" + getNumClusters()); Collections.addAll(result, super.getOptions()); return result.toArray(new String[result.size()]); }
/** * Gets the current settings of the classifier. * * @return an array of strings suitable for passing to setOptions */ @Override public String[] getOptions() { Vector<String> result = new Vector<String>(); result.add("-S"); result.add("" + getSeed()); Collections.addAll(result, super.getOptions()); return result.toArray(new String[result.size()]); }
/** * Returns default capabilities of the clusterer. * * @return the capabilities of this clusterer */ @Override public Capabilities getCapabilities() { Capabilities result = super.getCapabilities(); result.disableAll(); result.enable(Capability.NO_CLASS); // attributes result.enable(Capability.NOMINAL_ATTRIBUTES); result.enable(Capability.NUMERIC_ATTRIBUTES); result.enable(Capability.MISSING_VALUES); return result; }
/** * Parses a given list of options. * <p/> * <!-- options-start --> * Valid options are: <p/> * * <pre> -N <num> * number of clusters. (default = 2).</pre> * * <pre> -S <num> * Random number seed. * (default 1)</pre> * <!-- options-end --> * * @param options the list of options as an array of strings * @throws Exception if an option is not supported */ @Override public void setOptions(String[] options) throws Exception { String optionString = Utils.getOption('N', options); if (optionString.length() != 0) { setNumClusters(Integer.parseInt(optionString)); } super.setOptions(options); Utils.checkForRemainingOptions(options); }
/** * Returns the tip text for this property * * @return tip text for this property suitable for displaying in the * explorer/experimenter gui */ @Override public String seedTipText() { String result = super.seedTipText() + " Use -1 for no randomization."; return result; }
/** * Parses a given list of options. Valid options are: * <p> * * @param options the list of options as an array of strings * @throws Exception if an option is not supported */ @Override public void setOptions(String[] options) throws Exception { String tmpStr; tmpStr = Utils.getOption('S', options); if (tmpStr.length() != 0) { setSeed(Integer.parseInt(tmpStr)); } else { setSeed(m_SeedDefault); } super.setOptions(options); }
/** * Returns default capabilities of the clusterer. * * @return the capabilities of this clusterer */ @Override public Capabilities getCapabilities() { Capabilities result = super.getCapabilities(); result.disableAll(); result.enable(Capability.NO_CLASS); // attributes result.enable(Capability.NOMINAL_ATTRIBUTES); result.enable(Capability.NUMERIC_ATTRIBUTES); result.enable(Capability.MISSING_VALUES); return result; }
/** * Parses a given list of options. * <p/> * <!-- options-start --> * Valid options are: <p/> * * <pre> -N <num> * number of clusters. (default = 2).</pre> * * <pre> -S <num> * Random number seed. * (default 1)</pre> * <!-- options-end --> * * @param options the list of options as an array of strings * @throws Exception if an option is not supported */ @Override public void setOptions(String[] options) throws Exception { String optionString = Utils.getOption('N', options); if (optionString.length() != 0) { setNumClusters(Integer.parseInt(optionString)); } super.setOptions(options); Utils.checkForRemainingOptions(options); }
/** * Returns the tip text for this property * * @return tip text for this property suitable for displaying in the * explorer/experimenter gui */ @Override public String seedTipText() { String result = super.seedTipText() + " Use -1 for no randomization."; return result; }
/** * Parses a given list of options. Valid options are: * <p> * * @param options the list of options as an array of strings * @throws Exception if an option is not supported */ @Override public void setOptions(String[] options) throws Exception { String tmpStr; tmpStr = Utils.getOption('S', options); if (tmpStr.length() != 0) { setSeed(Integer.parseInt(tmpStr)); } else { setSeed(m_SeedDefault); } super.setOptions(options); }
/** * 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("\tnumber of clusters. (default = 2).", "N", 1, "-N <num>")); result.addAll(Collections.list(super.listOptions())); return result.elements(); }
/** * Returns default capabilities of the clusterer. * * @return the capabilities of this clusterer */ @Override public Capabilities getCapabilities() { Capabilities result = super.getCapabilities(); result.disableAll(); result.enable(Capability.NO_CLASS); // attributes result.enable(Capability.NOMINAL_ATTRIBUTES); result.enable(Capability.NUMERIC_ATTRIBUTES); result.enable(Capability.MISSING_VALUES); return result; }
/** * Gets the current settings of FarthestFirst * * @return an array of strings suitable for passing to setOptions() */ @Override public String[] getOptions() { Vector<String> result = new Vector<String>(); result.add("-N"); result.add("" + getNumClusters()); Collections.addAll(result, super.getOptions()); return result.toArray(new String[result.size()]); }
super.setOptions(options);
/** * Gets the current settings of the classifier. * * @return an array of strings suitable for passing to setOptions */ @Override public String[] getOptions() { Vector<String> result = new Vector<String>(); result.add("-S"); result.add("" + getSeed()); Collections.addAll(result, super.getOptions()); return result.toArray(new String[result.size()]); }
/** * Returns an enumeration describing the available options. * * @return an enumeration of all the available options. */ @Override public Enumeration listOptions() { Vector result = new Vector(); result.addElement(new Option( "\tnumber of clusters.\n" + "\t(default 2).", "N", 1, "-N <num>")); Enumeration en = super.listOptions(); while (en.hasMoreElements()) { result.addElement(en.nextElement()); } return result.elements(); }
/** * Returns default capabilities of the clusterer. * * @return the capabilities of this clusterer */ @Override public Capabilities getCapabilities() { Capabilities result = super.getCapabilities(); result.disableAll(); result.enable(Capability.NO_CLASS); // attributes result.enable(Capability.NOMINAL_ATTRIBUTES); result.enable(Capability.NUMERIC_ATTRIBUTES); result.enable(Capability.MISSING_VALUES); return result; }
/** * Gets the current settings of Cobweb. * * @return an array of strings suitable for passing to setOptions() */ @Override public String[] getOptions() { Vector<String> result = new Vector<String>(); result.add("-A"); result.add("" + m_acuity); result.add("-C"); result.add("" + m_cutoff); if (getSaveInstanceData()) { result.add("-save-data"); } Collections.addAll(result, super.getOptions()); return result.toArray(new String[result.size()]); }
super.setOptions(options);