Package jazzparser :: Package utils :: Package nltk :: Module probability :: Class CutoffConditionalFreqDist
[hide private]
[frames] | no frames]

Class CutoffConditionalFreqDist

source code

                          object --+    
                                   |    
nltk.probability.ConditionalFreqDist --+
                                       |
                                      CutoffConditionalFreqDist

A version of ConditionalFreqDist that uses a CutoffFreqDist for each distribution instead of FreqDist.

Instance Methods [hide private]
 
__init__(self, cutoff, *args, **kwargs)
Construct a new empty conditional frequency distribution.
source code
 
_get_cutoff(self)
Make cutoff a read-only attribute
source code
FreqDist
__getitem__(self, condition)
Override this to use CutoffFreqDists instead of FreqDists.
source code

Inherited from nltk.probability.ConditionalFreqDist: N, __eq__, __ge__, __gt__, __le__, __len__, __lt__, __ne__, __repr__, conditions, plot, tabulate

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

Properties [hide private]
  cutoff
Make cutoff a read-only attribute

Inherited from object: __class__

Method Details [hide private]

__init__(self, cutoff, *args, **kwargs)
(Constructor)

source code 

Construct a new empty conditional frequency distribution. In particular, the count for every sample, under every condition, is zero.

Parameters:
  • cond_samples - The samples to initialize the conditional frequency distribution with
Overrides: object.__init__
(inherited documentation)

__getitem__(self, condition)
(Indexing operator)

source code 

Override this to use CutoffFreqDists instead of FreqDists.

Parameters:
  • condition - The condition under which the experiment was run.
Returns: FreqDist
The frequency distribution that encodes the frequency of each sample outcome, given that the experiment was run under the given condition. If the frequency distribution for the given condition has not been accessed before, then this will create a new empty FreqDist for that condition.
Overrides: nltk.probability.ConditionalFreqDist.__getitem__

Property Details [hide private]

cutoff

Make cutoff a read-only attribute

Get Method:
_get_cutoff(self) - Make cutoff a read-only attribute