| Trees | Indices | Help |
|
|---|
|
|
object --+
|
ConditionalProbDistI --+
|
ConditionalProbDist
A conditional probability distribution modelling the experiments that
were used to generate a conditional frequency distribution. A
ConditoinalProbDist is constructed from a
ConditionalFreqDist and a ProbDist factory:
ConditionalFreqDist specifies the frequency
distribution for each condition.
ProbDist factory is a function that takes a
condition's frequency distribution, and returns its probability
distribution. A ProbDist class's name (such as
MLEProbDist or HeldoutProbDist) can be used
to specify that class's constructor.
The first argument to the ProbDist factory is the
frequency distribution that it should model; and the remaining arguments
are specified by the factory_args parameter to the
ConditionalProbDist constructor. For example, the following
code constructs a ConditionalProbDist, where the probability
distribution for each condition is an ELEProbDist with 10
bins:
>>> cpdist = ConditionalProbDist(cfdist, ELEProbDist, 10) >>> print cpdist['run'].max() 'NN' >>> print cpdist['run'].prob('NN') 0.0813
|
|||
|
|||
ProbDistI
|
|
||
|
|||
int
|
|
||
list
|
|
||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
|
Construct a new conditional probability distribution, based on the
given conditional frequency distribution and
|
|
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Nov 26 16:04:58 2012 | http://epydoc.sourceforge.net |