public abstract class CheckScheme extends Check
TestInstances| Modifier and Type | Class and Description |
|---|---|
static class |
CheckScheme.PostProcessor
a class for postprocessing the test-data
|
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
m_ClasspathProblems
whether classpath problems occurred
|
protected int |
m_NumDate
the number of date attributes
|
protected int |
m_NumInstances
The number of instances in the datasets
|
protected int |
m_NumInstancesRelational
the number of instances in relational attributes (applies also for bags
in multi-instance)
|
protected int |
m_NumNominal
the number of nominal attributes
|
protected int |
m_NumNumeric
the number of numeric attributes
|
protected int |
m_NumRelational
the number of relational attributes
|
protected int |
m_NumString
the number of string attributes
|
protected CheckScheme.PostProcessor |
m_PostProcessor
for post-processing the data even further
|
protected java.lang.String[] |
m_Words
for generating String attributes/classes
|
protected java.lang.String |
m_WordSeparators
for generating String attributes/classes
|
| Constructor and Description |
|---|
CheckScheme() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addMissing(Instances data,
int level,
boolean predictorMissing,
boolean classMissing)
Add missing values to a dataset.
|
protected static java.lang.String |
arrayToList(java.lang.String[] value)
turns the array into a comma-separated list
|
static java.lang.String |
attributeTypeToString(int type)
returns a string representation of the attribute type
|
protected void |
compareDatasets(Instances data1,
Instances data2)
Compare two datasets to see if they differ.
|
abstract void |
doTests()
Begin the tests, reporting results to System.out
|
int |
getNumDate()
returns the current number of date attributes
|
int |
getNumInstances()
Gets the current number of instances to use for the datasets.
|
int |
getNumInstancesRelational()
returns the current number of instances in relational/bag attributes to produce
|
int |
getNumNominal()
returns the current number of nominal attributes
|
int |
getNumNumeric()
returns the current number of numeric attributes
|
int |
getNumRelational()
returns the current number of relational attributes
|
int |
getNumString()
returns the current number of string attributes
|
java.lang.String[] |
getOptions()
Gets the current settings of the CheckClassifier.
|
CheckScheme.PostProcessor |
getPostProcessor()
returns the current PostProcessor, can be null
|
java.lang.String |
getWords()
returns the words used for assembling strings in a comma-separated list.
|
java.lang.String |
getWordSeparators()
returns the word separators (chars) to use for assembling strings.
|
boolean |
hasClasspathProblems()
returns TRUE if the classifier returned a "not in classpath" Exception
|
java.util.Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options.
|
protected static java.lang.String[] |
listToArray(java.lang.String value)
turns the comma-separated list into an array
|
protected Instances |
process(Instances data)
Provides a hook for derived classes to further modify the data.
|
void |
setNumDate(int value)
sets the number of data attributes
|
void |
setNumInstances(int value)
Sets the number of instances to use in the datasets (some classifiers
might require more instances).
|
void |
setNumInstancesRelational(int value)
sets the number of instances in relational/bag attributes to produce
|
void |
setNumNominal(int value)
sets the number of nominal attributes
|
void |
setNumNumeric(int value)
sets the number of numeric attributes
|
void |
setNumRelational(int value)
sets the number of relational attributes
|
void |
setNumString(int value)
sets the number of string attributes
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setPostProcessor(CheckScheme.PostProcessor value)
sets the PostProcessor to use
|
void |
setWords(java.lang.String value)
Sets the comma-separated list of words to use for generating strings.
|
void |
setWordSeparators(java.lang.String value)
sets the word separators (chars) to use for assembling strings.
|
forName, getDebug, getSilent, print, println, println, runCheck, setDebug, setSilentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRevisionprotected int m_NumInstances
protected int m_NumNominal
protected int m_NumNumeric
protected int m_NumString
protected int m_NumDate
protected int m_NumRelational
protected int m_NumInstancesRelational
protected java.lang.String[] m_Words
protected java.lang.String m_WordSeparators
protected CheckScheme.PostProcessor m_PostProcessor
protected boolean m_ClasspathProblems
public java.util.Enumeration<Option> listOptions()
listOptions in interface OptionHandlerlistOptions in class Checkpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
setOptions in interface OptionHandlersetOptions in class Checkoptions - the list of options as an array of stringsjava.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlergetOptions in class Checkpublic void setPostProcessor(CheckScheme.PostProcessor value)
value - the new PostProcessorm_PostProcessorpublic CheckScheme.PostProcessor getPostProcessor()
public boolean hasClasspathProblems()
public abstract void doTests()
public void setNumInstances(int value)
value - the number of instances to usepublic int getNumInstances()
public void setNumNominal(int value)
value - the number of nominal attributespublic int getNumNominal()
public void setNumNumeric(int value)
value - the number of numeric attributespublic int getNumNumeric()
public void setNumString(int value)
value - the number of string attributespublic int getNumString()
public void setNumDate(int value)
value - the number of date attributespublic int getNumDate()
public void setNumRelational(int value)
value - the number of relational attributespublic int getNumRelational()
public void setNumInstancesRelational(int value)
value - the number of instancespublic int getNumInstancesRelational()
protected static java.lang.String[] listToArray(java.lang.String value)
value - the list to processprotected static java.lang.String arrayToList(java.lang.String[] value)
value - the array to processpublic static java.lang.String attributeTypeToString(int type)
type - the attribute type to get a string rerpresentation forpublic void setWords(java.lang.String value)
value - the list of wordsjava.lang.IllegalArgumentException - if not at least 2 words are providedpublic java.lang.String getWords()
public void setWordSeparators(java.lang.String value)
value - the characters to use as separatorspublic java.lang.String getWordSeparators()
protected void compareDatasets(Instances data1, Instances data2) throws java.lang.Exception
data1 - one set of instancesdata2 - the other set of instancesjava.lang.Exception - if the datasets differprotected void addMissing(Instances data, int level, boolean predictorMissing, boolean classMissing)
data - the instances to add missing values tolevel - the level of missing values to add (if positive, this
is the probability that a value will be set to missing, if negative
all but one value will be set to missing (not yet implemented))predictorMissing - if true, predictor attributes will be modifiedclassMissing - if true, the class attribute will be modifiedprotected Instances process(Instances data)
data - the data to processm_PostProcessor