コード例 #1
0
 def information_gain(self):
     from nltk_contrib.classifier import entropy_of_key_counts
     return entropy_of_key_counts(self.root) - self.mean_information()
コード例 #2
0
 def information_gain(self):
     from nltk_contrib.classifier import entropy_of_key_counts
     return entropy_of_key_counts(self.root) - self.mean_information()
コード例 #3
0
 def entropy(self, attr_value):
     """
     Returns the entropy of class disctribution for a particular attribute value
     """
     from nltk_contrib.classifier import entropy_of_key_counts
     return entropy_of_key_counts(self.counts[attr_value])
コード例 #4
0
 def entropy(self, attr_value):
     """
     Returns the entropy of class disctribution for a particular attribute value
     """
     from nltk_contrib.classifier import entropy_of_key_counts
     return entropy_of_key_counts(self.counts[attr_value])