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)

Constructor Index

 o BayesNetK2()
 

Method Index

 o 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.
 o getOptions()
Gets the current settings of the Classifier.
 o getRandomOrder()
Get random order flag
 o globalInfo()
This will return a string describing the classifier.
 o listOptions()
Returns an enumeration describing the available options.
 o main(String[])
Main method for testing this class.
 o randomOrderTipText()
 
 o setOptions(String[])
Parses a given list of options.
 o setRandomOrder(boolean)
Set random order flag

Constructor Detail

 o BayesNetK2
public BayesNetK2()

Method Detail

 o 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
 o setRandomOrder
public void setRandomOrder(boolean bRandomOrder)
          Set random order flag
Parameters:
bRandomOrder -
 o getRandomOrder
public boolean getRandomOrder()
          Get random order flag
 o 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
 o 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
 o 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
 o randomOrderTipText
public java.lang.String randomOrderTipText()
Returns:
a string to describe the RandomOrder option.
 o globalInfo
public java.lang.String globalInfo()
          This will return a string describing the classifier.
Returns:
The string.
 o 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