public class NBTree
extends weka.classifiers.AbstractClassifier
implements weka.core.WeightedInstancesHandler, weka.core.Drawable, weka.core.Summarizable, weka.core.AdditionalMeasureProducer, weka.core.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
| Constructor and Description |
|---|
NBTree() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildClassifier(weka.core.Instances instances)
Generates the classifier.
|
double |
classifyInstance(weka.core.Instance instance)
Classifies an instance.
|
double[] |
distributionForInstance(weka.core.Instance instance)
Returns class probabilities for an instance.
|
java.util.Enumeration<java.lang.String> |
enumerateMeasures()
Returns an enumeration of the additional measure names
|
weka.core.Capabilities |
getCapabilities()
Returns default capabilities of the classifier tree.
|
double |
getMeasure(java.lang.String additionalMeasureName)
Returns the value of the named measure
|
java.lang.String |
getRevision()
Returns the revision string.
|
weka.core.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.
|
java.lang.String |
globalInfo()
Returns a string describing classifier
|
java.lang.String |
graph()
Returns graph describing the tree.
|
int |
graphType()
Returns the type of graph this classifier represents.
|
static void |
main(java.lang.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
|
java.lang.String |
toString()
Returns a description of the classifier.
|
java.lang.String |
toSummaryString()
Returns a superconcise version of the model
|
batchSizeTipText, debugTipText, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, getOptions, implementsMoreEfficientBatchPrediction, listOptions, makeCopies, makeCopy, numDecimalPlacesTipText, postExecution, preExecution, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlaces, setOptionspublic java.lang.String globalInfo()
public weka.core.TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface weka.core.TechnicalInformationHandlerpublic weka.core.Capabilities getCapabilities()
getCapabilities in interface weka.classifiers.ClassifiergetCapabilities in interface weka.core.CapabilitiesHandlergetCapabilities in class weka.classifiers.AbstractClassifierpublic void buildClassifier(weka.core.Instances instances)
throws java.lang.Exception
buildClassifier in interface weka.classifiers.Classifierinstances - the data to train withjava.lang.Exception - if classifier can't be built successfullypublic double classifyInstance(weka.core.Instance instance)
throws java.lang.Exception
classifyInstance in interface weka.classifiers.ClassifierclassifyInstance in class weka.classifiers.AbstractClassifierinstance - the instance to classifyjava.lang.Exception - if instance can't be classified successfullypublic final double[] distributionForInstance(weka.core.Instance instance)
throws java.lang.Exception
distributionForInstance in interface weka.classifiers.ClassifierdistributionForInstance in class weka.classifiers.AbstractClassifierinstance - the instance to get the distribution forjava.lang.Exception - if distribution can't be computed successfullypublic java.lang.String toString()
toString in class java.lang.Objectpublic int graphType()
graphType in interface weka.core.Drawablepublic java.lang.String graph()
throws java.lang.Exception
graph in interface weka.core.Drawablejava.lang.Exception - if graph can't be computedpublic java.lang.String toSummaryString()
toSummaryString in interface weka.core.Summarizablepublic double measureTreeSize()
public double measureNumLeaves()
public double measureNumRules()
public double getMeasure(java.lang.String additionalMeasureName)
getMeasure in interface weka.core.AdditionalMeasureProduceradditionalMeasureName - the name of the measure to query for its valuejava.lang.IllegalArgumentException - if the named measure is not supportedpublic java.util.Enumeration<java.lang.String> enumerateMeasures()
enumerateMeasures in interface weka.core.AdditionalMeasureProducerpublic java.lang.String getRevision()
getRevision in interface weka.core.RevisionHandlergetRevision in class weka.classifiers.AbstractClassifierpublic static void main(java.lang.String[] argv)
argv - the commandline options