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 void
buildClassifier(Instances data)
Method for building a naive bayes classifier treeCapabilities
getCapabilities()
Returns default capabilities of the classifier tree.java.lang.String
getRevision()
Returns the revision string.java.lang.String
graph()
Returns graph describing the tree.java.lang.String
printLeafModels()
Print the models at the leavesjava.lang.String
toString()
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:
getCapabilities
in interfaceCapabilitiesHandler
- Overrides:
getCapabilities
in 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:
buildClassifier
in 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:
toString
in classClassifierTree
- Returns:
- the tree structure
-
graph
public java.lang.String graph() throws java.lang.Exception
Returns graph describing the tree.- Specified by:
graph
in interfaceDrawable
- Overrides:
graph
in 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:
getRevision
in interfaceRevisionHandler
- Overrides:
getRevision
in classClassifierTree
- Returns:
- the revision
-
-