public abstract class DataGenerator extends Object implements OptionHandler, Randomizable, Serializable, RevisionHandler
| Constructor and Description |
|---|
DataGenerator()
initializes with default settings.
|
| Modifier and Type | Method and Description |
|---|---|
String |
debugTipText()
Returns the tip text for this property
|
PrintWriter |
defaultOutput()
Gets writer, which is used for outputting to stdout.
|
Instances |
defineDataFormat()
Initializes the format for the dataset produced.
|
Vector<Option> |
enumToVector(Enumeration<Option> enu)
Convenience method.
|
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 String |
generateFinished()
Generates a comment string that documentates the data generator.
|
abstract 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.
|
String[] |
getOptions()
Gets the current settings of the datagenerator RDG1.
|
PrintWriter |
getOutput()
Gets the print writer.
|
Random |
getRandom()
Gets the random generator.
|
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.
|
Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options.
|
static void |
makeData(DataGenerator generator,
String[] options)
Calls the data generator.
|
String |
outputTipText()
Returns the tip text for this property
|
String |
randomTipText()
Returns the tip text for this property
|
String |
relationNameTipText()
Returns the tip text for this property
|
static void |
runDataGenerator(DataGenerator datagenerator,
String[] options)
runs the datagenerator instance with the given options.
|
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(String[] options)
Parses a list of options for this object.
|
void |
setOutput(PrintWriter newOutput)
Sets the print writer.
|
void |
setRandom(Random newRandom)
Sets the random generator.
|
void |
setRelationName(String relationName)
Sets the relation name the dataset should have.
|
void |
setSeed(int newSeed)
Sets the random number seed.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRevisionpublic DataGenerator()
public Enumeration<Option> listOptions()
listOptions in interface OptionHandlerpublic Vector<Option> enumToVector(Enumeration<Option> enu)
public void setOptions(String[] options) throws Exception
setOptions in interface OptionHandleroptions - the list of options as an array of stringsException - if an option is not supportedpublic String[] getOptions()
getOptions in interface OptionHandlerremoveBlacklist(String[])public Instances defineDataFormat() throws Exception
Exception - if the generating of the format faileddefaultRelationName()public abstract Instance generateExample() throws Exception
public abstract Instances generateExamples() throws Exception
public abstract String generateStart() throws Exception
Exception - if the generating of the documentation failspublic abstract String generateFinished() throws Exception
Exception - if the generating of the documentation failspublic abstract boolean getSingleModeFlag()
throws Exception
Exception - if mode is not set yetpublic void setDebug(boolean debug)
debug - the new debug flagpublic boolean getDebug()
public String debugTipText()
public void setRelationName(String relationName)
relationName - the new relation namepublic String getRelationName()
public String relationNameTipText()
public int getNumExamplesAct()
public void setOutput(PrintWriter newOutput)
newOutput - the new print writerpublic PrintWriter getOutput()
public PrintWriter defaultOutput()
public String outputTipText()
public void setDatasetFormat(Instances newFormat)
newFormat - the new dataset format of the datasetpublic Instances getDatasetFormat()
public String formatTipText()
public int getSeed()
getSeed in interface Randomizablepublic void setSeed(int newSeed)
setSeed in interface RandomizablenewSeed - the new random number seed.public String seedTipText()
public Random getRandom()
public void setRandom(Random newRandom)
newRandom - is the random generator.public String randomTipText()
public static void makeData(DataGenerator generator, String[] options) throws Exception
generator - one of the data generatorsoptions - options of the data generatorException - if there was an error in the option listpublic static void runDataGenerator(DataGenerator datagenerator, String[] options)
datagenerator - the datagenerator to runoptions - the commandline optionsCopyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.