|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.classifiers.AbstractClassifier
weka.classifiers.trees.NBTree
public class NBTree
Class for generating a decision tree with naive Bayes classifiers at the leaves.
For more information, see
Ron Kohavi: Scaling Up the Accuracy of Naive-Bayes Classifiers: A Decision-Tree Hybrid. In: Second International Conference on Knoledge Discovery and Data Mining, 202-207, 1996.
@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
| Field Summary |
|---|
| Fields inherited from interface weka.core.Drawable |
|---|
BayesNet, Newick, NOT_DRAWABLE, TREE |
| Constructor Summary | |
|---|---|
NBTree()
|
|
| Method Summary | |
|---|---|
void |
buildClassifier(Instances instances)
Generates the classifier. |
double |
classifyInstance(Instance instance)
Classifies an instance. |
double[] |
distributionForInstance(Instance instance)
Returns class probabilities for an instance. |
java.util.Enumeration |
enumerateMeasures()
Returns an enumeration of the additional measure names |
Capabilities |
getCapabilities()
Returns default capabilities of the classifier. |
double |
getMeasure(java.lang.String additionalMeasureName)
Returns the value of the named measure |
java.lang.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. |
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 |
| Methods inherited from class weka.classifiers.AbstractClassifier |
|---|
debugTipText, forName, getDebug, getOptions, listOptions, makeCopies, makeCopy, setDebug, setOptions |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NBTree()
| Method Detail |
|---|
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface TechnicalInformationHandlerpublic Capabilities getCapabilities()
getCapabilities in interface ClassifiergetCapabilities in interface CapabilitiesHandlergetCapabilities in class AbstractClassifierCapabilities
public void buildClassifier(Instances instances)
throws java.lang.Exception
buildClassifier in interface Classifierinstances - the data to train with
java.lang.Exception - if classifier can't be built successfully
public double classifyInstance(Instance instance)
throws java.lang.Exception
classifyInstance in interface ClassifierclassifyInstance in class AbstractClassifierinstance - the instance to classify
java.lang.Exception - if instance can't be classified successfully
public final double[] distributionForInstance(Instance instance)
throws java.lang.Exception
distributionForInstance in interface ClassifierdistributionForInstance in class AbstractClassifierinstance - the instance to get the distribution for
java.lang.Exception - if distribution can't be computed successfullypublic java.lang.String toString()
toString in class java.lang.Objectpublic int graphType()
graphType in interface Drawable
public java.lang.String graph()
throws java.lang.Exception
graph in interface Drawablejava.lang.Exception - if graph can't be computedpublic java.lang.String toSummaryString()
toSummaryString in interface Summarizablepublic double measureTreeSize()
public double measureNumLeaves()
public double measureNumRules()
public double getMeasure(java.lang.String additionalMeasureName)
getMeasure in interface AdditionalMeasureProduceradditionalMeasureName - the name of the measure to query for its value
java.lang.IllegalArgumentException - if the named measure is not supportedpublic java.util.Enumeration enumerateMeasures()
enumerateMeasures in interface AdditionalMeasureProducerpublic java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class AbstractClassifierpublic static void main(java.lang.String[] argv)
argv - the commandline options
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||