public class NBTree extends Classifier implements WeightedInstancesHandler, Drawable, Summarizable, AdditionalMeasureProducer, TechnicalInformationHandler
@inproceedings{Kohavi1996,
author = {Ron Kohavi},
booktitle = {Second International Conference on Knoledge Discovery and Data Mining},
pages = {202-207},
title = {Scaling Up the Accuracy of Naive-Bayes Classifiers: A Decision-Tree Hybrid},
year = {1996}
}
Valid options are:
-D If set, classifier is run in debug mode and may output additional info to the console
BayesNet, Newick, NOT_DRAWABLE, TREE| Constructor and Description |
|---|
NBTree() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildClassifier(Instances instances)
Generates the classifier.
|
double |
classifyInstance(Instance instance)
Classifies an instance.
|
double[] |
distributionForInstance(Instance instance)
Returns class probabilities for an instance.
|
Enumeration |
enumerateMeasures()
Returns an enumeration of the additional measure names
|
Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
double |
getMeasure(String additionalMeasureName)
Returns the value of the named measure
|
String |
getRevision()
Returns the revision string.
|
TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing
detailed information about the technical background of this class,
e.g., paper reference or book this class is based on.
|
String |
globalInfo()
Returns a string describing classifier
|
String |
graph()
Returns graph describing the tree.
|
int |
graphType()
Returns the type of graph this classifier
represents.
|
static void |
main(String[] argv)
Main method for testing this class
|
double |
measureNumLeaves()
Returns the number of leaves
|
double |
measureNumRules()
Returns the number of rules (same as number of leaves)
|
double |
measureTreeSize()
Returns the size of the tree
|
String |
toString()
Returns a description of the classifier.
|
String |
toSummaryString()
Returns a superconcise version of the model
|
debugTipText, forName, getDebug, getOptions, listOptions, makeCopies, makeCopy, setDebug, setOptionspublic String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface TechnicalInformationHandlerpublic Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class ClassifierCapabilitiespublic void buildClassifier(Instances instances) throws Exception
buildClassifier in class Classifierinstances - the data to train withException - if classifier can't be built successfullypublic double classifyInstance(Instance instance) throws Exception
classifyInstance in class Classifierinstance - the instance to classifyException - if instance can't be classified successfullypublic final double[] distributionForInstance(Instance instance) throws Exception
distributionForInstance in class Classifierinstance - the instance to get the distribution forException - if distribution can't be computed successfullypublic String toString()
public int graphType()
public String toSummaryString()
toSummaryString in interface Summarizablepublic double measureTreeSize()
public double measureNumLeaves()
public double measureNumRules()
public double getMeasure(String additionalMeasureName)
getMeasure in interface AdditionalMeasureProduceradditionalMeasureName - the name of the measure to query for its valueIllegalArgumentException - if the named measure is not supportedpublic Enumeration enumerateMeasures()
enumerateMeasures in interface AdditionalMeasureProducerpublic String getRevision()
getRevision in interface RevisionHandlergetRevision in class Classifierpublic static void main(String[] argv)
argv - the commandline optionsCopyright © 2021 University of Waikato, Hamilton, NZ. All rights reserved.