/** * Returns the capabilities of this multi-instance classifier for the * relational data. * * @return the capabilities of this object * @see Capabilities */ @Override public Capabilities getMultiInstanceCapabilities() { Capabilities result = super.getCapabilities(); // class result.disableAllClasses(); result.enable(Capability.NO_CLASS); return result; }
/** * 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("-N"); result.add("" + m_filterType); 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<Option> listOptions() { Vector<Option> result = new Vector<Option>(); result.addElement(new Option( "\tWhether to 0=normalize/1=standardize/2=neither.\n" + "\t(default 1=standardize)", "N", 1, "-N <num>")); result.addAll(Collections.list(super.listOptions())); return result.elements(); }
super.setOptions(options);
/** * 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("-S"); options.add("" + getSeed()); Collections.addAll(options, super.getOptions()); return options.toArray(new String[0]); }
/** * Parses a given list of options. Valid options are:<p> * * -W classname <br> * Specify the full class name of the base learner.<p> * * -I num <br> * Set the number of iterations (default 10). <p> * * -S num <br> * Set the random number seed (default 1). <p> * * Options after -- are passed to the designated classifier.<p> * * @param options the list of options as an array of strings * @exception Exception if an option is not supported */ public void setOptions(String[] options) throws Exception { String seed = Utils.getOption('S', options); if (seed.length() != 0) { setSeed(Integer.parseInt(seed)); } else { setSeed(1); } super.setOptions(options); }
super.setOptions(options);
/** * 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("-S"); options.add("" + getSeed()); Collections.addAll(options, super.getOptions()); return options.toArray(new String[0]); }
/** * Parses a given list of options. Valid options are:<p> * * -W classname <br> * Specify the full class name of the base learner.<p> * * -I num <br> * Set the number of iterations (default 10). <p> * * -S num <br> * Set the random number seed (default 1). <p> * * Options after -- are passed to the designated classifier.<p> * * @param options the list of options as an array of strings * @exception Exception if an option is not supported */ public void setOptions(String[] options) throws Exception { String seed = Utils.getOption('S', options); if (seed.length() != 0) { setSeed(Integer.parseInt(seed)); } else { setSeed(1); } 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>(); if (getUsingCutOff()) { result.add("-C"); } result.add("-R"); result.add("" + getNumRuns()); 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<Option> listOptions() { Vector<Option> result = new Vector<Option>(); result.addElement(new Option("\tSet whether or not use empirical\n" + "\tlog-odds cut-off instead of 0", "C", 0, "-C")); result.addElement(new Option("\tSet the number of multiple runs \n" + "\tneeded for searching the MLE.", "R", 1, "-R <numOfRuns>")); result.addAll(Collections.list(super.listOptions())); return result.elements(); }
/** * Returns the capabilities of this multi-instance classifier for the * relational data. * * @return the capabilities of this object * @see Capabilities */ @Override public Capabilities getMultiInstanceCapabilities() { Capabilities result = super.getCapabilities(); result.disableAll(); // attributes result.enable(Capability.NUMERIC_ATTRIBUTES); result.enable(Capability.MISSING_VALUES); // class result.disableAllClasses(); result.enable(Capability.NO_CLASS); return result; }
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>(); if (getUsingCutOff()) { result.add("-C"); } result.add("-R"); result.add("" + getNumRuns()); 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<Option> listOptions() { Vector<Option> result = new Vector<Option>(); result.addElement(new Option("\tSet whether or not use empirical\n" + "\tlog-odds cut-off instead of 0", "C", 0, "-C")); result.addElement(new Option("\tSet the number of multiple runs \n" + "\tneeded for searching the MLE.", "R", 1, "-R <numOfRuns>")); result.addAll(Collections.list(super.listOptions())); return result.elements(); }
/** * Returns default capabilities of the classifier. * * @return the capabilities of this classifier */ @Override public Capabilities getCapabilities() { Capabilities result = super.getCapabilities(); result.disableAll(); // attributes result.enable(Capability.NOMINAL_ATTRIBUTES); result.enable(Capability.RELATIONAL_ATTRIBUTES); // class result.enable(Capability.BINARY_CLASS); result.enable(Capability.MISSING_CLASS_VALUES); // other result.enable(Capability.ONLY_MULTIINSTANCE); return result; }
reset(); super.setOptions(options);
/** * Gets the current settings of the classifier. * * @return an array of strings suitable for passing to setOptions */ @Override public String[] getOptions() { java.util.Vector<String> result = new java.util.Vector<String>(); result.addElement("-L"); result.addElement("" + getNoise()); result.addElement("-N"); result.addElement("" + m_filterType); result.addElement("-K"); result.addElement("" + m_kernel.getClass().getName() + " " + Utils.joinOptions(m_kernel.getOptions())); Collections.addAll(result, super.getOptions()); return result.toArray(new String[result.size()]); }
/** * 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 default capabilities of the classifier. * * @return the capabilities of this classifier */ @Override public Capabilities getCapabilities() { Capabilities result = super.getCapabilities(); result.disableAll(); // attributes result.enable(Capability.NOMINAL_ATTRIBUTES); result.enable(Capability.RELATIONAL_ATTRIBUTES); // class result.enable(Capability.BINARY_CLASS); result.enable(Capability.MISSING_CLASS_VALUES); // other result.enable(Capability.ONLY_MULTIINSTANCE); return result; }