Package nltk_lite :: Package contrib :: Package classifier :: Module decisionstump :: Class DecisionStump
[hide private]
[frames] | no frames]

Class DecisionStump

source code

Instance Methods [hide private]
 
__init__(self, attribute, klass) source code
 
update_count(self, instance) source code
 
error(self) source code
 
klass(self, instance) source code
 
majority_klass(self, attr_value) source code
 
entropy(self, attr_value)
Returns the entropy of class disctribution for a particular attribute value
source code
 
mean_information(self) source code
 
information_gain(self) source code
 
gain_ratio(self) source code
 
__str__(self) source code
Instance Variables [hide private]
  attribute
counts is a dictionary in which each key is an attribute value and each value is a dictionary of class frequencies for that attribute value