class documentation
class PositiveNaiveBayesClassifier(NaiveBayesClassifier): (source)
Constructor: PositiveNaiveBayesClassifier(label_probdist, feature_probdist)
Undocumented
Static Method | train |
No summary |
Inherited from NaiveBayesClassifier
:
Method | __init__ |
No summary |
Method | classify |
No summary |
Method | labels |
No summary |
Method | most |
Return a list of the 'most informative' features used by this classifier. For the purpose of this function, the informativeness of a feature (fname,fval) is equal to the highest value of P(fname=fval|label), for any label, divided by the lowest value of P(fname=fval|label), for any label:... |
Method | prob |
No summary |
Method | show |
Undocumented |
Instance Variable | _feature |
Undocumented |
Instance Variable | _label |
Undocumented |
Instance Variable | _labels |
Undocumented |
Instance Variable | _most |
Undocumented |
Inherited from ClassifierI
(via NaiveBayesClassifier
):
Method | classify |
Apply self.classify() to each element of featuresets. I.e.: |
Method | prob |
Apply self.prob_classify() to each element of featuresets. I.e.: |
@staticmethod
def train(positive_featuresets, unlabeled_featuresets, positive_prob_prior=0.5, estimator=ELEProbDist): (source) ΒΆ
def train(positive_featuresets, unlabeled_featuresets, positive_prob_prior=0.5, estimator=ELEProbDist): (source) ΒΆ
Parameters | |
positive | An iterable of featuresets that are known as positive examples (i.e., their label is True). |
unlabeled | An iterable of featuresets whose label is unknown. |
positive | A prior estimate of the probability of the label True (default 0.5). |
estimator | Undocumented |