Package weka.classifiers.trees.j48
Class NBTreeClassifierTree
java.lang.Object
weka.classifiers.trees.j48.ClassifierTree
weka.classifiers.trees.j48.NBTreeClassifierTree
- All Implemented Interfaces:
Serializable
,CapabilitiesHandler
,Drawable
,RevisionHandler
Class for handling a naive bayes tree structure used for classification.
- Version:
- $Revision: 14511 $
- Author:
- Mark Hall (mhall@cs.waikato.ac.nz)
- See Also:
-
Field Summary
Fields inherited from interface weka.core.Drawable
BayesNet, Newick, NOT_DRAWABLE, TREE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
buildClassifier
(Instances data) Method for building a naive bayes classifier treeReturns the revision string.graph()
Returns graph describing the tree.Print the models at the leavestoString()
Prints tree structure.Methods inherited from class weka.classifiers.trees.j48.ClassifierTree
assignIDs, buildTree, buildTree, classifyInstance, cleanup, distributionForInstance, getCapabilities, getLocalModel, getMembershipValues, getSons, getTrainingData, graphType, isLeaf, numLeaves, numNodes, prefix, toSource
-
Constructor Details
-
NBTreeClassifierTree
-
-
Method Details
-
buildClassifier
Method for building a naive bayes classifier tree- Overrides:
buildClassifier
in classClassifierTree
- Parameters:
data
- the data to build the tree from- Throws:
Exception
- if something goes wrong
-
printLeafModels
Print the models at the leaves- Returns:
- textual description of the leaf models
-
toString
Prints tree structure.- Overrides:
toString
in classClassifierTree
- Returns:
- the tree structure
-
graph
Returns graph describing the tree.- Specified by:
graph
in interfaceDrawable
- Overrides:
graph
in classClassifierTree
- Returns:
- the tree as graph
- Throws:
Exception
- if something goes wrong
-
getRevision
Returns the revision string.- Specified by:
getRevision
in interfaceRevisionHandler
- Overrides:
getRevision
in classClassifierTree
- Returns:
- the revision
-