|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.classifiers.AbstractClassifier
weka.classifiers.bayes.BayesNet
weka.classifiers.bayes.net.EditableBayesNet
weka.classifiers.bayes.net.BayesNetGenerator
public class BayesNetGenerator
Bayes Network learning using various search algorithms and quality measures.
Base class for a Bayes Network classifier. Provides datastructures (network structure, conditional probability distributions, etc.) and facilities common to Bayes Network learning algorithms like K2 and B.
For more information see:
http://www.cs.waikato.ac.nz/~remco/weka.pdf
-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.
Field Summary |
---|
Fields inherited from class weka.classifiers.bayes.BayesNet |
---|
m_Distributions, m_Instances |
Fields inherited from interface weka.core.Drawable |
---|
BayesNet, Newick, NOT_DRAWABLE, TREE |
Constructor Summary | |
---|---|
BayesNetGenerator()
Constructor for BayesNetGenerator. |
Method Summary | |
---|---|
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 |
String[] |
getOptions()
Gets the current settings of the classifier. |
String |
getRevision()
Returns the revision string. |
void |
Init(int nNodes,
int nValues)
Init defines a minimal Bayes net with no arcs |
Enumeration |
listOptions()
Returns an enumeration describing the available options |
static void |
main(String[] args)
Main method |
void |
setOptions(String[] options)
Parses a given list of options. |
String |
toString()
Returns either the net (if BIF format) or the generated instances |
Methods inherited from class weka.classifiers.bayes.net.EditableBayesNet |
---|
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 |
Methods inherited from class weka.classifiers.AbstractClassifier |
---|
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, runClassifier, setDebug |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BayesNetGenerator()
Method Detail |
---|
public void generateRandomNetwork() throws Exception
Exception
- if something goes wrongpublic void Init(int nNodes, int nValues) throws Exception
nNodes
- number of nodes in the Bayes netnValues
- number of values each of the nodes can take
Exception
- if something goes wrongpublic void generateRandomNetworkStructure(int nNodes, int nArcs) throws 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) / 2
Exception
- if number of arcs is incorrectpublic void generateInstances() throws Exception
Exception
- if something goes wrongpublic String toString()
toString
in class BayesNet
public Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class BayesNet
public void setOptions(String[] options) throws 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 strings
Exception
- if an option is not supportedpublic String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class BayesNet
public String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class EditableBayesNet
public static void main(String[] args)
args
- the commandline parameters
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |