nltk :: probability :: DictionaryConditionalProbDist :: Class DictionaryConditionalProbDist
[hide private]
[frames] | no frames]

Class DictionaryConditionalProbDist

          object --+    
                   |    
ConditionalProbDistI --+
                       |
                      DictionaryConditionalProbDist

An alternative ConditionalProbDist that simply wraps a dictionary of ProbDists rather than creating these from FreqDists.

Instance Methods [hide private]
ProbDistI
__getitem__(self, condition)
Returns: The probability distribution for the experiment run under the given condition.
 
__init__(self, probdist_dict)
x.__init__(...) initializes x; see help(type(x)) for signature
list
conditions(self)
Returns: A list of the conditions that are represented by this ConditionalProbDist.

Inherited from ConditionalProbDistI: __len__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__getitem__(self, condition)
(Indexing operator)

 
Parameters:
  • condition - The condition whose probability distribution should be returned.
Returns: ProbDistI
The probability distribution for the experiment run under the given condition.
Overrides: ConditionalProbDistI.__getitem__
(inherited documentation)

__init__(self, probdist_dict)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • probdist_dict (dict any -> probdist) - a dictionary containing the probdists indexed by the conditions
Overrides: object.__init__

conditions(self)

 
Returns: list
A list of the conditions that are represented by this ConditionalProbDist. Use the indexing operator to access the probability distribution for a given condition.
Overrides: ConditionalProbDistI.conditions
(inherited documentation)