public class BayesNetGenerator extends EditableBayesNet
-B Generate network (instead of instances)
-N <integer> Nr of nodes
-A <integer> Nr of arcs
-M <integer> Nr of instances
-C <integer> Cardinality of the variables
-S <integer> Seed for random number generator
-F <file> The BIF file to obtain the structure from.
m_Distributions, m_Instances
BayesNet, Newick, NOT_DRAWABLE, TREE
Constructor and Description |
---|
BayesNetGenerator()
Constructor for BayesNetGenerator.
|
Modifier and Type | Method and Description |
---|---|
void |
generateInstances()
GenerateInstances generates random instances sampling from the
distribution represented by the Bayes network structure.
|
void |
generateRandomNetwork()
Generate random connected Bayesian network with discrete nodes
having all the same cardinality.
|
void |
generateRandomNetworkStructure(int nNodes,
int nArcs)
GenerateRandomNetworkStructure generate random connected Bayesian network
|
java.lang.String[] |
getOptions()
Gets the current settings of the classifier.
|
java.lang.String |
getRevision()
Returns the revision string.
|
void |
Init(int nNodes,
int nValues)
Init defines a minimal Bayes net with no arcs
|
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options
|
static void |
main(java.lang.String[] args)
Main method
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
java.lang.String |
toString()
Returns either the net (if BIF format) or the generated instances
|
addArc, addArc, addArc, addNode, addNode, addNodeValue, alignBottom, alignLeft, alignRight, alignTop, canRedo, canUndo, centerHorizontal, centerVertical, clearUndoStack, deleteArc, deleteArc, deleteNode, deleteNode, deleteSelection, delNodeValue, getChildren, getContent, getDistribution, getDistribution, getEvidence, getMargin, getNode, getNode2, getPositionX, getPositionY, getValueName, getValues, getValues, isChanged, isSaved, lastActionMsg, layoutGraph, paste, redo, renameNodeValue, setData, setDistribution, setDistribution, setEvidence, setMargin, setNodeName, setPosition, setPosition, spaceHorizontal, spaceVertical, toXMLBIF03, toXMLBIF03, undo
BIFFileTipText, buildClassifier, buildStructure, countsForInstance, distributionForInstance, enumerateMeasures, estimateCPTs, estimatorTipText, getADTree, getBIFFile, getBIFHeader, getCapabilities, getCardinality, getDistributions, getEstimator, getMeasure, getName, getNodeName, getNodeValue, getNrOfNodes, getNrOfParents, getParent, getParentCardinality, getParentSet, getParentSets, getProbability, getSearchAlgorithm, getUseADTree, globalInfo, graph, graphType, initCPTs, initStructure, measureAICScore, measureBayesScore, measureBDeuScore, measureDivergence, measureEntropyScore, measureExtraArcs, measureMDLScore, measureMissingArcs, measureReversedArcs, partitionOptions, searchAlgorithmTipText, setBIFFile, setEstimator, setSearchAlgorithm, setUseADTree, updateClassifier, useADTreeTipText
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug
public void generateRandomNetwork() throws java.lang.Exception
java.lang.Exception
- if something goes wrongpublic void Init(int nNodes, int nValues) throws java.lang.Exception
nNodes
- number of nodes in the Bayes netnValues
- number of values each of the nodes can takejava.lang.Exception
- if something goes wrongpublic void generateRandomNetworkStructure(int nNodes, int nArcs) throws java.lang.Exception
nNodes
- number of nodes in the Bayes net to generatenArcs
- number of arcs to generate. Must be between nNodes - 1 and nNodes * (nNodes-1) / 2java.lang.Exception
- if number of arcs is incorrectpublic void generateInstances() throws java.lang.Exception
java.lang.Exception
- if something goes wrongpublic java.lang.String toString()
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class BayesNet
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-B Generate network (instead of instances)
-N <integer> Nr of nodes
-A <integer> Nr of arcs
-M <integer> Nr of instances
-C <integer> Cardinality of the variables
-S <integer> Seed for random number generator
-F <file> The BIF file to obtain the structure from.
setOptions
in interface OptionHandler
setOptions
in class BayesNet
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class BayesNet
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class EditableBayesNet
public static void main(java.lang.String[] args)
args
- the commandline parameters