| |
|
| java.lang.Object weka.core.Check weka.core.CheckScheme
All known Subclasses: weka.attributeSelection.CheckAttributeSelection, weka.classifiers.CheckClassifier, weka.clusterers.CheckClusterer, weka.associations.CheckAssociator, weka.classifiers.functions.supportVector.CheckKernel,
CheckScheme | abstract public class CheckScheme extends Check (Code) | | Abstract general class for testing schemes in Weka. Derived classes are
also used for JUnit tests.
author: FracPete (fracpete at waikato dot ac dot nz) version: $Revision: 1.3 $ See Also: TestInstances |
Inner Class :public static class PostProcessor | |
m_ClasspathProblems | protected boolean m_ClasspathProblems(Code) | | whether classpath problems occurred
|
m_NumDate | protected int m_NumDate(Code) | | the number of date attributes
|
m_NumInstances | protected int m_NumInstances(Code) | | The number of instances in the datasets
|
m_NumInstancesRelational | protected int m_NumInstancesRelational(Code) | | the number of instances in relational attributes (applies also for bags
in multi-instance)
|
m_NumNominal | protected int m_NumNominal(Code) | | the number of nominal attributes
|
m_NumNumeric | protected int m_NumNumeric(Code) | | the number of numeric attributes
|
m_NumRelational | protected int m_NumRelational(Code) | | the number of relational attributes
|
m_NumString | protected int m_NumString(Code) | | the number of string attributes
|
m_PostProcessor | protected PostProcessor m_PostProcessor(Code) | | for post-processing the data even further
|
m_WordSeparators | protected String m_WordSeparators(Code) | | for generating String attributes/classes
|
m_Words | protected String[] m_Words(Code) | | for generating String attributes/classes
|
addMissing | protected void addMissing(Instances data, int level, boolean predictorMissing, boolean classMissing)(Code) | | Add missing values to a dataset.
Parameters: data - the instances to add missing values to Parameters: level - the level of missing values to add (if positive, thisis the probability that a value will be set to missing, if negativeall but one value will be set to missing (not yet implemented)) Parameters: predictorMissing - if true, predictor attributes will be modified Parameters: classMissing - if true, the class attribute will be modified |
arrayToList | protected static String arrayToList(String[] value)(Code) | | turns the array into a comma-separated list
Parameters: value - the array to process the array as list |
attributeTypeToString | public static String attributeTypeToString(int type)(Code) | | returns a string representation of the attribute type
Parameters: type - the attribute type to get a string rerpresentation for the string representation |
compareDatasets | protected void compareDatasets(Instances data1, Instances data2) throws Exception(Code) | | Compare two datasets to see if they differ.
Parameters: data1 - one set of instances Parameters: data2 - the other set of instances throws: Exception - if the datasets differ |
doTests | abstract public void doTests()(Code) | | Begin the tests, reporting results to System.out
|
getNumDate | public int getNumDate()(Code) | | returns the current number of date attributes
the number of date attributes |
getNumInstances | public int getNumInstances()(Code) | | Gets the current number of instances to use for the datasets.
the number of instances |
getNumInstancesRelational | public int getNumInstancesRelational()(Code) | | returns the current number of instances in relational/bag attributes to produce
the number of instances |
getNumNominal | public int getNumNominal()(Code) | | returns the current number of nominal attributes
the number of nominal attributes |
getNumNumeric | public int getNumNumeric()(Code) | | returns the current number of numeric attributes
the number of numeric attributes |
getNumRelational | public int getNumRelational()(Code) | | returns the current number of relational attributes
the number of relational attributes |
getNumString | public int getNumString()(Code) | | returns the current number of string attributes
the number of string attributes |
getOptions | public String[] getOptions()(Code) | | Gets the current settings of the CheckClassifier.
an array of strings suitable for passing to setOptions |
getPostProcessor | public PostProcessor getPostProcessor()(Code) | | returns the current PostProcessor, can be null
the current PostProcessor |
getWordSeparators | public String getWordSeparators()(Code) | | returns the word separators (chars) to use for assembling strings.
the current separators |
getWords | public String getWords()(Code) | | returns the words used for assembling strings in a comma-separated list.
the words as comma-separated list |
hasClasspathProblems | public boolean hasClasspathProblems()(Code) | | returns TRUE if the classifier returned a "not in classpath" Exception
true if CLASSPATH problems occurred |
listOptions | public Enumeration listOptions()(Code) | | Returns an enumeration describing the available options.
an enumeration of all the available options. |
listToArray | protected static String[] listToArray(String value)(Code) | | turns the comma-separated list into an array
Parameters: value - the list to process the list as array |
setNumDate | public void setNumDate(int value)(Code) | | sets the number of data attributes
Parameters: value - the number of date attributes |
setNumInstances | public void setNumInstances(int value)(Code) | | Sets the number of instances to use in the datasets (some classifiers
might require more instances).
Parameters: value - the number of instances to use |
setNumInstancesRelational | public void setNumInstancesRelational(int value)(Code) | | sets the number of instances in relational/bag attributes to produce
Parameters: value - the number of instances |
setNumNominal | public void setNumNominal(int value)(Code) | | sets the number of nominal attributes
Parameters: value - the number of nominal attributes |
setNumNumeric | public void setNumNumeric(int value)(Code) | | sets the number of numeric attributes
Parameters: value - the number of numeric attributes |
setNumRelational | public void setNumRelational(int value)(Code) | | sets the number of relational attributes
Parameters: value - the number of relational attributes |
setNumString | public void setNumString(int value)(Code) | | sets the number of string attributes
Parameters: value - the number of string attributes |
setOptions | public void setOptions(String[] options) throws Exception(Code) | | Parses a given list of options.
Parameters: options - the list of options as an array of strings throws: Exception - if an option is not supported |
setPostProcessor | public void setPostProcessor(PostProcessor value)(Code) | | sets the PostProcessor to use
Parameters: value - the new PostProcessor See Also: CheckScheme.m_PostProcessor |
setWordSeparators | public void setWordSeparators(String value)(Code) | | sets the word separators (chars) to use for assembling strings.
Parameters: value - the characters to use as separators |
setWords | public void setWords(String value)(Code) | | Sets the comma-separated list of words to use for generating strings. The
list must contain at least 2 words, otherwise an exception will be thrown.
Parameters: value - the list of words throws: IllegalArgumentException - if not at least 2 words are provided |
|
|
|