public class BayesNet extends ClassificationGenerator
-h Prints this help.
-o <file> The name of the output file, otherwise the generated data is printed to stdout.
-r <name> The name of the relation.
-d Whether to print debug informations.
-S The seed for random function (default 1)
-n <num> The number of examples to generate (default 100)
-A <num> The number of arcs to use. (default 20)
-C <num> The cardinality of the attributes and the class. (default 2)
BayesNetGenerator,
Serialized Form| Constructor and Description |
|---|
BayesNet()
initializes the generator
|
| Modifier and Type | Method and Description |
|---|---|
String |
cardinalityTipText()
Returns the tip text for this property
|
Instances |
defineDataFormat()
Initializes the format for the dataset produced.
|
Instance |
generateExample()
Generates one example of the dataset.
|
Instances |
generateExamples()
Generates all examples of the dataset.
|
String |
generateFinished()
Generates a comment string that documentats the data generator.
|
String |
generateStart()
Generates a comment string that documentates the data generator.
|
int |
getCardinality()
Gets the cardinality of the attributes (incl class attribute)
|
int |
getNumArcs()
Gets the number of arcs for the bayesian net
|
int |
getNumAttributes()
Gets the number of attributes that should be produced.
|
int |
getNumExamples()
Gets the number of examples, given by option.
|
String[] |
getOptions()
Gets the current settings of the datagenerator.
|
String |
getRevision()
Returns the revision string.
|
boolean |
getSingleModeFlag()
Return if single mode is set for the given data generator mode depends on
option setting and or generator type.
|
String |
globalInfo()
Returns a string describing this data generator.
|
Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(String[] args)
Main method for executing this class.
|
String |
numArcsTipText()
Returns the tip text for this property
|
String |
numAttributesTipText()
Returns the tip text for this property
|
void |
setCardinality(int value)
Sets the cardinality of the attributes (incl class attribute)
|
void |
setNumArcs(int value)
Sets the number of arcs for the bayesian net
|
void |
setNumAttributes(int numAttributes)
Sets the number of attributes the dataset should have.
|
void |
setNumExamples(int numExamples)
Sets the number of examples, given by option.
|
void |
setOptions(String[] options)
Parses a list of options for this object.
|
numExamplesTipTextdebugTipText, defaultOutput, enumToVector, formatTipText, getDatasetFormat, getDebug, getNumExamplesAct, getOutput, getRandom, getRelationName, getSeed, makeData, outputTipText, randomTipText, relationNameTipText, seedTipText, setDatasetFormat, setDebug, setOutput, setRandom, setRelationName, setSeedpublic String globalInfo()
public Enumeration<Option> listOptions()
listOptions in interface OptionHandlerlistOptions in class ClassificationGeneratorpublic void setOptions(String[] options) throws Exception
-h Prints this help.
-o <file> The name of the output file, otherwise the generated data is printed to stdout.
-r <name> The name of the relation.
-d Whether to print debug informations.
-S The seed for random function (default 1)
-n <num> The number of examples to generate (default 100)
-A <num> The number of arcs to use. (default 20)
-C <num> The cardinality of the attributes and the class. (default 2)
setOptions in interface OptionHandlersetOptions in class ClassificationGeneratoroptions - the list of options as an array of stringsException - if an option is not supportedpublic String[] getOptions()
getOptions in interface OptionHandlergetOptions in class ClassificationGeneratorDataGenerator.removeBlacklist(String[])public void setNumAttributes(int numAttributes)
numAttributes - the new number of attributespublic int getNumAttributes()
public String numAttributesTipText()
public void setCardinality(int value)
value - the cardinalitypublic int getCardinality()
public String cardinalityTipText()
public void setNumArcs(int value)
value - the number of arcspublic int getNumArcs()
public String numArcsTipText()
public void setNumExamples(int numExamples)
setNumExamples in class ClassificationGeneratornumExamples - the new number of examplespublic int getNumExamples()
getNumExamples in class ClassificationGeneratorpublic boolean getSingleModeFlag()
throws Exception
getSingleModeFlag in class DataGeneratorException - if mode is not set yetpublic Instances defineDataFormat() throws Exception
defineDataFormat in class DataGeneratorException - if the generating of the format failedDataGenerator.getSeed()public Instance generateExample() throws Exception
generateExample in class DataGeneratorException - if the format of the dataset is not yet definedException - if the generator only works with generateExamples which
means in non single modepublic Instances generateExamples() throws Exception
generateExamples in class DataGeneratorException - if the format of the dataset is not yet definedException - if the generator only works with generateExample, which
means in single modeDataGenerator.getSeed()public String generateStart()
generateStart in class DataGeneratorpublic String generateFinished() throws Exception
generateFinished in class DataGeneratorException - if the generating of the documentaion failspublic String getRevision()
public static void main(String[] args)
args - should contain arguments for the data producer:Copyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.