Class NaiveBayes
java.lang.Object
weka.classifiers.bayes.net.search.SearchAlgorithm
weka.classifiers.bayes.net.search.fixed.NaiveBayes
- All Implemented Interfaces:
Serializable
,OptionHandler
,RevisionHandler
The NaiveBayes class generates a fixed Bayes network structure with arrows from the class variable to each of the attribute variables.
- Version:
- $Revision: 8034 $
- Author:
- Remco Bouckaert
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
buildStructure
(BayesNet bayesNet, Instances instances) buildStructure determines the network structure/graph of the network.Returns the revision string.Returns a string describing this objectMethods inherited from class weka.classifiers.bayes.net.search.SearchAlgorithm
getOptions, initAsNaiveBayesTipText, listOptions, maxNrOfParentsTipText, setOptions, toString
-
Constructor Details
-
NaiveBayes
public NaiveBayes()
-
-
Method Details
-
globalInfo
Returns a string describing this object- Returns:
- a description of the classifier suitable for displaying in the explorer/experimenter gui
-
buildStructure
Description copied from class:SearchAlgorithm
buildStructure determines the network structure/graph of the network. The default behavior is creating a network where all nodes have the first node as its parent (i.e., a BayesNet that behaves like a naive Bayes classifier). This method can be overridden by derived classes to restrict the class of network structures that are acceptable.- Overrides:
buildStructure
in classSearchAlgorithm
- Parameters:
bayesNet
-instances
- the instances to work with- Throws:
Exception
- if something goes wrong
-
getRevision
Returns the revision string.- Specified by:
getRevision
in interfaceRevisionHandler
- Overrides:
getRevision
in classSearchAlgorithm
- Returns:
- the revision
-