Package weka.classifiers.trees.j48
Class NBTreeClassifierTree
- java.lang.Object
-
- weka.classifiers.trees.j48.ClassifierTree
-
- weka.classifiers.trees.j48.NBTreeClassifierTree
-
- All Implemented Interfaces:
java.io.Serializable,CapabilitiesHandler,Drawable,RevisionHandler
public class NBTreeClassifierTree extends ClassifierTree
Class for handling a naive bayes tree structure used for classification.- Version:
- $Revision: 10286 $
- Author:
- Mark Hall (mhall@cs.waikato.ac.nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface weka.core.Drawable
BayesNet, Newick, NOT_DRAWABLE, TREE
-
-
Constructor Summary
Constructors Constructor Description NBTreeClassifierTree(ModelSelection toSelectLocModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuildClassifier(Instances data)Method for building a naive bayes classifier treeCapabilitiesgetCapabilities()Returns default capabilities of the classifier tree.java.lang.StringgetRevision()Returns the revision string.java.lang.Stringgraph()Returns graph describing the tree.java.lang.StringprintLeafModels()Print the models at the leavesjava.lang.StringtoString()Prints tree structure.-
Methods inherited from class weka.classifiers.trees.j48.ClassifierTree
assignIDs, buildTree, buildTree, classifyInstance, cleanup, distributionForInstance, graphType, numLeaves, numNodes, prefix, toSource
-
-
-
-
Constructor Detail
-
NBTreeClassifierTree
public NBTreeClassifierTree(ModelSelection toSelectLocModel)
-
-
Method Detail
-
getCapabilities
public Capabilities getCapabilities()
Returns default capabilities of the classifier tree.- Specified by:
getCapabilitiesin interfaceCapabilitiesHandler- Overrides:
getCapabilitiesin classClassifierTree- Returns:
- the capabilities of this classifier tree
- See Also:
Capabilities
-
buildClassifier
public void buildClassifier(Instances data) throws java.lang.Exception
Method for building a naive bayes classifier tree- Overrides:
buildClassifierin classClassifierTree- Parameters:
data- the data to build the tree from- Throws:
java.lang.Exception- if something goes wrong
-
printLeafModels
public java.lang.String printLeafModels()
Print the models at the leaves- Returns:
- textual description of the leaf models
-
toString
public java.lang.String toString()
Prints tree structure.- Overrides:
toStringin classClassifierTree- Returns:
- the tree structure
-
graph
public java.lang.String graph() throws java.lang.ExceptionReturns graph describing the tree.- Specified by:
graphin interfaceDrawable- Overrides:
graphin classClassifierTree- Returns:
- the tree as graph
- Throws:
java.lang.Exception- if something goes wrong
-
getRevision
public java.lang.String getRevision()
Returns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Overrides:
getRevisionin classClassifierTree- Returns:
- the revision
-
-