nltk.ConditionalProbDistI
¶
-
class
nltk.
ConditionalProbDistI
[source]¶ A collection of probability distributions for a single experiment run under different conditions. Conditional probability distributions are used to estimate the likelihood of each sample, given the condition under which the experiment was run. For example, a conditional probability distribution could be used to estimate the probability of each word type in a document, given the length of the word type. Formally, a conditional probability distribution can be defined as a function that maps from each condition to the
ProbDist
for the experiment under that condition.
Methods¶
__init__ () |
|
clear (() -> None. Remove all items from D.) |
|
conditions () |
Return a list of the conditions that are represented by this ConditionalProbDist . |
copy (() -> a shallow copy of D) |
|
fromkeys (...) |
v defaults to None. |
get ((k[,d]) -> D[k] if k in D, ...) |
|
has_key ((k) -> True if D has a key k, else False) |
|
items (() -> list of D’s (key, value) pairs, ...) |
|
iteritems (() -> an iterator over the (key, ...) |
|
iterkeys (() -> an iterator over the keys of D) |
|
itervalues (...) |
|
keys (() -> list of D’s keys) |
|
pop ((k[,d]) -> v, ...) |
If key is not found, d is returned if given, otherwise KeyError is raised |
popitem (() -> (k, v), ...) |
2-tuple; but raise KeyError if D is empty. |
setdefault ((k[,d]) -> D.get(k,d), ...) |
|
unicode_repr () |
Return a string representation of this ConditionalProbDist . |
update (([E, ...) |
If E present and has a .keys() method, does: for k in E: D[k] = E[k] |
values (() -> list of D’s values) |
|
viewitems (...) |
|
viewkeys (...) |
|
viewvalues (...) |