|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.datagenerators.DataGenerator
public abstract class DataGenerator
Abstract superclass for data generators that generate data for classifiers and clusterers.
Constructor Summary | |
---|---|
DataGenerator()
initializes with default settings. |
Method Summary | |
---|---|
java.lang.String |
debugTipText()
Returns the tip text for this property |
java.io.StringWriter |
defaultOutput()
Gets the string writer, which is used for outputting to stdout. |
Instances |
defineDataFormat()
Initializes the format for the dataset produced. |
java.lang.String |
formatTipText()
Returns the tip text for this property |
abstract Instance |
generateExample()
Generates one example of the dataset. |
abstract Instances |
generateExamples()
Generates all examples of the dataset. |
abstract java.lang.String |
generateFinished()
Generates a comment string that documentates the data generator. |
abstract java.lang.String |
generateStart()
Generates a comment string that documentates the data generator. |
Instances |
getDatasetFormat()
Gets the format of the dataset that is to be generated. |
boolean |
getDebug()
Gets the debug flag. |
int |
getNumExamplesAct()
Gets the number of examples the dataset should have. |
java.lang.String[] |
getOptions()
Gets the current settings of the datagenerator RDG1. |
java.io.PrintWriter |
getOutput()
Gets the print writer. |
java.util.Random |
getRandom()
Gets the random generator. |
java.lang.String |
getRelationName()
Gets the relation name the dataset should have. |
int |
getSeed()
Gets the random number seed. |
abstract boolean |
getSingleModeFlag()
Return if single mode is set for the given data generator mode depends on option setting and or generator type. |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options. |
static void |
makeData(DataGenerator generator,
java.lang.String[] options)
Calls the data generator. |
java.lang.String |
outputTipText()
Returns the tip text for this property |
java.lang.String |
randomTipText()
Returns the tip text for this property |
java.lang.String |
relationNameTipText()
Returns the tip text for this property |
java.lang.String |
seedTipText()
Returns the tip text for this property |
void |
setDatasetFormat(Instances newFormat)
Sets the format of the dataset that is to be generated. |
void |
setDebug(boolean debug)
Sets the debug flag. |
void |
setOptions(java.lang.String[] options)
Parses a list of options for this object. |
void |
setOutput(java.io.PrintWriter newOutput)
Sets the print writer. |
void |
setRandom(java.util.Random newRandom)
Sets the random generator. |
void |
setRelationName(java.lang.String relationName)
Sets the relation name the dataset should have. |
void |
setSeed(int newSeed)
Sets the random number seed. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface weka.core.RevisionHandler |
---|
getRevision |
Constructor Detail |
---|
public DataGenerator()
Method Detail |
---|
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
public void setOptions(java.lang.String[] options) throws java.lang.Exception
setOptions
in interface OptionHandler
options
- the list of options as an array of strings
java.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
removeBlacklist(String[])
public Instances defineDataFormat() throws java.lang.Exception
java.lang.Exception
- if the generating of the format faileddefaultRelationName()
public abstract Instance generateExample() throws java.lang.Exception
java.lang.Exception
- if the format of the dataset is not yet defined
java.lang.Exception
- if the generator only works with generateExamples
which means in non single modepublic abstract Instances generateExamples() throws java.lang.Exception
java.lang.Exception
- if the format of the dataset is not yet defined
java.lang.Exception
- if the generator only works with generateExample,
which means in single modepublic abstract java.lang.String generateStart() throws java.lang.Exception
java.lang.Exception
- if the generating of the documentation failspublic abstract java.lang.String generateFinished() throws java.lang.Exception
java.lang.Exception
- if the generating of the documentation failspublic abstract boolean getSingleModeFlag() throws java.lang.Exception
java.lang.Exception
- if mode is not set yetpublic void setDebug(boolean debug)
debug
- the new debug flagpublic boolean getDebug()
public java.lang.String debugTipText()
public void setRelationName(java.lang.String relationName)
relationName
- the new relation namepublic java.lang.String getRelationName()
public java.lang.String relationNameTipText()
public int getNumExamplesAct()
public void setOutput(java.io.PrintWriter newOutput)
newOutput
- the new print writerpublic java.io.PrintWriter getOutput()
public java.io.StringWriter defaultOutput()
public java.lang.String outputTipText()
public void setDatasetFormat(Instances newFormat)
newFormat
- the new dataset format of the datasetpublic Instances getDatasetFormat()
public java.lang.String formatTipText()
public int getSeed()
getSeed
in interface Randomizable
public void setSeed(int newSeed)
setSeed
in interface Randomizable
newSeed
- the new random number seed.public java.lang.String seedTipText()
public java.util.Random getRandom()
public void setRandom(java.util.Random newRandom)
newRandom
- is the random generator.public java.lang.String randomTipText()
public static void makeData(DataGenerator generator, java.lang.String[] options) throws java.lang.Exception
generator
- one of the data generatorsoptions
- options of the data generator
java.lang.Exception
- if there was an error in the option list
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |