MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _cdf

Method _cdf

tensorflow/contrib/distributions/python/ops/geometric.py:155–166  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

153 math_ops.log(sampled) / math_ops.log1p(-self.probs))
154
155 def _cdf(self, x):
156 if self.validate_args:
157 x = distribution_util.embed_check_nonnegative_integer_form(x)
158 else:
159 # Whether or not x is integer-form, the following is well-defined.
160 # However, scipy takes the floor, so we do too.
161 x = math_ops.floor(x)
162 x *= array_ops.ones_like(self.probs)
163 return array_ops.where(
164 x < 0.,
165 array_ops.zeros_like(x),
166 -math_ops.expm1((1. + x) * math_ops.log1p(-self.probs)))
167
168 def _log_prob(self, x):
169 if self.validate_args:

Callers

nothing calls this directly

Calls 1

log1pMethod · 0.45

Tested by

no test coverage detected