| Trees | Indices | Help |
|
|---|
|
|
Extensions to NLTK's probability module.
Author: Mark Granroth-Wilding <mark.granroth-wilding@ed.ac.uk>
|
|||
|
WittenBellProbDistFix There's a nasty bug in WittenBellProbDist, but the fix is very simple. |
|||
|
CutoffFreqDist Like FreqDist, but returns zero counts for everything with a count less than a given cutoff. |
|||
|
CutoffConditionalFreqDist A version of ConditionalFreqDist that uses a CutoffFreqDist for each distribution instead of FreqDist. |
|||
| CutoffFreqDistStorer | |||
| CutoffConditionalFreqDistStorer | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
ESTIMATORS = {'mle': mle_estimator, 'laplace': laplace_estimat
|
|||
__package__ =
|
|||
|
|||
Returns the base 2 log of the given probability (or other float). If prob == 0.0, returns -inf. |
Identical to NLTK's nltk.probability.add_logs, but handles the special case where one or both of the numbers is -inf. NLTK's version gives a nan in this case. |
Generates a sample chosen randomly from the observed samples of an NLTK prob dist, weighted according to their probability. NLTK provides this, but doesn't allow for the summed probability of the observed samples not being 1.0. But, of course, this is the case when we're smoothing. |
Takes a probability distribution estimated in any way (e.g. from a freq dist) and produces a corresponding dictionary prob dist that just stores the probability of every sample. Can be used to turn any kind of prob dist into a dictionary-based one, including a MutableProbDist.
|
Takes a conditional probability distribution which may estimate its probabilities in any way (most likely from a set of frequency distributions) and produces an equivalent dictionary conditional distribution, whose distributions are dictionary prob dists.
|
|
|
|
|
|
|
|||
ESTIMATORS
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Nov 26 16:04:56 2012 | http://epydoc.sourceforge.net |