nltk.classify.DecisionTreeClassifier.__init__

DecisionTreeClassifier.__init__(label, feature_name=None, decisions=None, default=None)[source]
Parameters:
  • label – The most likely label for tokens that reach this node in the decision tree. If this decision tree has no children, then this label will be assigned to any token that reaches this decision tree.
  • feature_name – The name of the feature that this decision tree selects for.
  • decisions – A dictionary mapping from feature values for the feature identified by feature_name to child decision trees.
  • default – The child that will be used if the value of feature feature_name does not match any of the keys in decisions. This is used when constructing binary decision trees.