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

Class DictionaryConditionalProbDist

source code

          object --+    
                   |    
ConditionalProbDistI --+
                       |
                      DictionaryConditionalProbDist

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

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

Inherited from ConditionalProbDistI: __len__

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, probdist_dict)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

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

__getitem__(self, condition)
(Indexing operator)

source code 
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)

conditions(self)

source code 
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)