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`

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

Modifier and Type
Method
Description
`void`
`buildClassifier(Instances data)`
Method for building a naive bayes classifier tree
`Capabilities`
`getCapabilities()`
Returns default capabilities of the classifier tree.
`String`
`getRevision()`
Returns the revision string.
`String`
`graph()`
Returns graph describing the tree.
`String`
`printLeafModels()`
Print the models at the leaves
`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`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### NBTreeClassifierTree

public NBTreeClassifierTree(ModelSelection toSelectLocModel)

## Method Details

### getCapabilities

public Capabilities getCapabilities()
Returns default capabilities of the classifier tree.

Specified by:
  `getCapabilities` in interface `CapabilitiesHandler`
Overrides:
  `getCapabilities` in class `ClassifierTree`
Returns:
  the capabilities of this classifier tree
See Also:
  - `Capabilities`

### buildClassifier

public void buildClassifier(Instances data) throws Exception
Method for building a naive bayes classifier tree

Overrides:
  `buildClassifier` in class `ClassifierTree`
Parameters:
  `data` - the data to build the tree from
Throws:
  `Exception` - if something goes wrong

### printLeafModels

public String printLeafModels()
Print the models at the leaves

Returns:
  textual description of the leaf models

### toString

public String toString()
Prints tree structure.

Overrides:
  `toString` in class `ClassifierTree`
Returns:
  the tree structure

### graph

public String graph() throws Exception
Returns graph describing the tree.

Specified by:
  `graph` in interface `Drawable`
Overrides:
  `graph` in class `ClassifierTree`
Returns:
  the tree as graph
Throws:
  `Exception` - if something goes wrong

### getRevision

public String getRevision()
Returns the revision string.

Specified by:
  `getRevision` in interface `RevisionHandler`
Overrides:
  `getRevision` in class `ClassifierTree`
Returns:
  the revision