Package nltk :: Package classify :: Module decisiontree :: Class DecisionTreeClassifier
[hide private]
[frames] | no frames]

Class DecisionTreeClassifier

source code

     object --+    
              |    
api.ClassifierI --+
                  |
                 DecisionTreeClassifier

Instance Methods [hide private]
 
__init__(self, label, feature_name=None, decisions=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
list of (immutable)
labels(self)
Returns: the list of category labels used by this classifier.
source code
label
classify(self, featureset)
Returns: the most appropriate label for the given featureset.
source code
 
error(self, labeled_featuresets) source code
 
pp(self, width=70, prefix='', depth=4) source code
 
__str__(self)
str(x)
source code
 
refine(self, labeled_featuresets, entropy_cutoff, depth_cutoff, support_cutoff) source code

Inherited from api.ClassifierI: batch_classify, batch_prob_classify, prob_classify

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

    Deprecated

Inherited from api.ClassifierI: batch_probdist, probdist

Static Methods [hide private]
 
train(labeled_featuresets, entropy_cutoff=0.05, depth_cutoff=100, support_cutoff=10) source code
 
leaf(labeled_featuresets) source code
 
stump(feature_name, labeled_featuresets) source code
 
best_stump(feature_names, labeled_featuresets) source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, label, feature_name=None, decisions=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

labels(self)

source code 
Returns: list of (immutable)
the list of category labels used by this classifier.
Overrides: api.ClassifierI.labels
(inherited documentation)

classify(self, featureset)

source code 
Returns: label
the most appropriate label for the given featureset.
Overrides: api.ClassifierI.classify
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)