Package nltk_lite :: Module probability :: Class ConditionalProbDistI
[show private | hide private]
[frames | no frames]

Type ConditionalProbDistI

object --+
         |
        ConditionalProbDistI

Known Subclasses:
ConditionalProbDist, DictionaryConditionalProbDist

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.
Method Summary
  __init__(self)
ProbDistI __getitem__(self, condition)
Return the probability distribution for the experiment run under the given condition.
list conditions(self)
Return a list of the conditions that are represented by this ConditionalProbDist.
Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Method Details

__getitem__(self, condition)
(Indexing operator)

Parameters:
condition - The condition whose probability distribution should be returned.
           (type=any)
Returns:
The probability distribution for the experiment run under the given condition.
           (type=ProbDistI)

conditions(self)

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

Generated by Epydoc 2.1 on Tue Sep 5 09:37:22 2006 http://epydoc.sf.net