MCPcopy
hub / github.com/nltk/nltk / N

Method N

nltk/probability.py:107–119  ·  view source on GitHub ↗

Return the total number of sample outcomes that have been recorded by this FreqDist. For the number of unique sample values (or bins) with counts greater than zero, use ``FreqDist.B()``. :rtype: int

(self)

Source from the content-addressed store, hash-verified

105 self._N = None
106
107 def N(self):
108 """
109 Return the total number of sample outcomes that have been
110 recorded by this FreqDist. For the number of unique
111 sample values (or bins) with counts greater than zero, use
112 ``FreqDist.B()``.
113
114 :rtype: int
115 """
116 if self._N is None:
117 # Not already cached, or cache has been invalidated
118 self._N = sum(self.values())
119 return self._N
120
121 def __setitem__(self, key, val):
122 """

Callers 15

freqMethod · 0.95
plotMethod · 0.95
__str__Method · 0.95
binary_stumpMethod · 0.95
__repr__Method · 0.45
__init__Method · 0.45
__repr__Method · 0.45
__repr__Method · 0.45
__repr__Method · 0.45
__init__Method · 0.45
__repr__Method · 0.45
__init__Method · 0.45

Calls 1

valuesMethod · 0.80

Tested by

no test coverage detected