All Packages Class Hierarchy This Package Previous Next Index WEKA's home
Class weka.classifiers.bayes.BayesNetK2
java.lang.Object
|
+----weka.classifiers.Classifier
|
+----weka.classifiers.DistributionClassifier
|
+----weka.classifiers.bayes.BayesNet
|
+----weka.classifiers.bayes.BayesNetK2
- public class BayesNetK2
- extends BayesNet
Class for a Bayes Network classifier based on K2 for learning structure.
K2 is a hill climbing algorihtm by Greg Cooper and Ed Herskovitz,
Proceedings Uncertainty in Artificial Intelligence, 1991, Also in
Machine Learning, 1992 pages 309-347.
Works with nominal variables and no missing values only.
- Version:
- $Revision: 1.2 $
- Author:
- Remco Bouckaert (rrb@xm.co.nz)
BayesNetK2()
-
buildStructure()
- buildStructure determines the network structure/graph of the network
with the K2 algorithm, restricted by its initial structure (which can
be an empty graph, or a Naive Bayes graph.
getOptions()
- Gets the current settings of the Classifier.
getRandomOrder()
- Get random order flag
globalInfo()
- This will return a string describing the classifier.
listOptions()
- Returns an enumeration describing the available options.
main(String[])
- Main method for testing this class.
randomOrderTipText()
-
setOptions(String[])
- Parses a given list of options.
setRandomOrder(boolean)
- Set random order flag
BayesNetK2
public BayesNetK2()
buildStructure
public void buildStructure() throws java.lang.Exception
buildStructure determines the network structure/graph of the network
with the K2 algorithm, restricted by its initial structure (which can
be an empty graph, or a Naive Bayes graph.
- Overrides:
- buildStructure in class BayesNet
setRandomOrder
public void setRandomOrder(boolean bRandomOrder)
Set random order flag
- Parameters:
bRandomOrder -
getRandomOrder
public boolean getRandomOrder()
Get random order flag
listOptions
public java.util.Enumeration listOptions()
Returns an enumeration describing the available options.
- Returns:
- an enumeration of all the available options.
- Overrides:
- listOptions in class BayesNet
setOptions
public void setOptions(java.lang.String options[]) throws java.lang.Exception
Parses a given list of options. Valid options are:
-R
Set the random order to true (default false).
For other options see bagging.
- Parameters:
options - the list of options as an array of strings
- Throws:
- java.lang.Exception - if an option is not supported
- Overrides:
- setOptions in class BayesNet
getOptions
public java.lang.String[] getOptions()
Gets the current settings of the Classifier.
- Returns:
- an array of strings suitable for passing to setOptions
- Overrides:
- getOptions in class BayesNet
randomOrderTipText
public java.lang.String randomOrderTipText()
- Returns:
- a string to describe the RandomOrder option.
globalInfo
public java.lang.String globalInfo()
This will return a string describing the classifier.
- Returns:
- The string.
main
public static void main(java.lang.String argv[])
Main method for testing this class.
- Parameters:
argv - the options
All Packages Class Hierarchy This Package Previous Next Index WEKA's home