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_InstancesBATCH_SIZE_DEFAULT, NUM_DECIMAL_PLACES_DEFAULTBayesNet, 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<Option> |
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, undoBIFFileTipText, buildClassifier, buildStructure, countsForInstance, distributionForInstance, enumerateMeasures, estimateCPTs, estimatorTipText, getADTree, getBIFFile, getBIFHeader, getCapabilities, getCardinality, getDistributions, getEstimator, getMeasure, getName, getNodeName, getNodeValue, getNrOfNodes, getNrOfParents, getNumInstances, 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, useADTreeTipTextbatchSizeTipText, classifyInstance, debugTipText, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, postExecution, preExecution, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlacesequals, getClass, hashCode, notify, notifyAll, wait, wait, waitmakeCopypublic 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<Option> listOptions()
listOptions in interface OptionHandlerlistOptions in class BayesNetpublic 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 OptionHandlersetOptions in class BayesNetoptions - 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 BayesNetpublic java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class EditableBayesNetpublic static void main(java.lang.String[] args)
args - the commandline parameters