def _cdf(self, x): if self.validate_args: # We set `check_integer=False` since the CDF is defined on whole real # line. x = distribution_util.embed_check_nonnegative_discrete( x, check_integer=False) return math_ops.igammac(math_ops.floor(x + 1), self.rate)
def _cdf(self, x): if self.validate_args: # We set `check_integer=False` since the CDF is defined on whole real # line. x = distribution_util.embed_check_nonnegative_discrete( x, check_integer=False) return math_ops.igammac(math_ops.floor(x + 1), self.rate)
def _cdf(self, x): if self.validate_args: x = distribution_util.embed_check_nonnegative_integer_form(x) else: # Whether or not x is integer-form, the following is well-defined. # However, scipy takes the floor, so we do too. x = math_ops.floor(x) return math_ops.igammac(1. + x, self.rate)
def cdf(self, x, name="cdf"): """CDF of observations `x` under these InverseGamma distribution(s). Args: x: tensor of dtype `dtype`, must be broadcastable with `alpha` and `beta`. name: The name to give this op. Returns: cdf: tensor of dtype `dtype`, the CDFs of `x`. """ with ops.name_scope(self.name): with ops.op_scope([self._alpha, self._beta, x], name): return math_ops.igammac(self._alpha, self._beta / x)
def cdf(self, x, name="cdf"): """CDF of observations `x` under these InverseGamma distribution(s). Args: x: tensor of dtype `dtype`, must be broadcastable with `alpha` and `beta`. name: The name to give this op. Returns: cdf: tensor of dtype `dtype`, the CDFs of `x`. """ with ops.name_scope(self.name): with ops.op_scope([self._alpha, self._beta, x], name): return math_ops.igammac(self._alpha, self._beta / x)
def cdf(self, x, name="cdf"): """Cumulative density function. Args: x: Non-negative floating point tensor with dtype `dtype` and whose shape can be broadcast with `self.lam`. name: A name for this operation. Returns: The CDF of the events. """ with ops.name_scope(self.name): with ops.name_scope(name, values=[self.lam, x]): x = self._check_x(x, check_integer=False) return math_ops.igammac(math_ops.floor(x + 1), self.lam)
def cdf(self, x, name="cdf"): """Cumulative density function. Args: x: Non-negative floating point tensor with dtype `dtype` and whose shape can be broadcast with `self.lam`. name: A name for this operation. Returns: The CDF of the events. """ with ops.name_scope(self.name): with ops.name_scope(name, values=[self.lam, x]): x = self._check_x(x, check_integer=False) return math_ops.igammac(math_ops.floor(x + 1), self.lam)
def log_cdf(self, x, name="log_cdf"): """Log CDF of observations `x` under these InverseGamma distribution(s). Args: x: tensor of dtype `dtype`, must be broadcastable with `alpha` and `beta`. name: The name to give this op. Returns: log_cdf: tensor of dtype `dtype`, the log-CDFs of `x`. """ with ops.name_scope(self.name): with ops.op_scope([self._alpha, self._beta, x], name): x = ops.convert_to_tensor(x) x = control_flow_ops.with_dependencies([check_ops.assert_positive(x)] if self.strict else [], x) contrib_tensor_util.assert_same_float_dtype(tensors=[x], dtype=self.dtype) # Note that igammac returns the upper regularized incomplete gamma # function Q(a, x), which is what we want for the CDF. return math_ops.log(math_ops.igammac(self._alpha, self._beta / x))
def log_cdf(self, x, name="log_cdf"): """Log CDF of observations `x` under these InverseGamma distribution(s). Args: x: tensor of dtype `dtype`, must be broadcastable with `alpha` and `beta`. name: The name to give this op. Returns: log_cdf: tensor of dtype `dtype`, the log-CDFs of `x`. """ with ops.name_scope(self.name): with ops.name_scope(name, values=[self._alpha, self._beta, x]): x = ops.convert_to_tensor(x) x = control_flow_ops.with_dependencies([check_ops.assert_positive(x)] if self.validate_args else [], x) contrib_tensor_util.assert_same_float_dtype(tensors=[x,], dtype=self.dtype) # Note that igammac returns the upper regularized incomplete gamma # function Q(a, x), which is what we want for the CDF. return math_ops.log(math_ops.igammac(self._alpha, self._beta / x))
def _igammac(a, x): return math_ops.igammac(a, x)
def _cdf(self, x): x = self._assert_valid_sample(x, check_integer=False) return math_ops.igammac(math_ops.floor(x + 1), self.lam)
def _cdf(self, x): x = self._maybe_assert_valid_sample(x) # Note that igammac returns the upper regularized incomplete gamma # function Q(a, x), which is what we want for the CDF. return math_ops.igammac(self.concentration, self.rate / x)
def _cdf(self, x): x = control_flow_ops.with_dependencies( [check_ops.assert_positive(x)] if self.validate_args else [], x) # Note that igammac returns the upper regularized incomplete gamma # function Q(a, x), which is what we want for the CDF. return math_ops.igammac(self.alpha, self.beta / x)
def _cdf(self, x): x = self._maybe_assert_valid_sample(x) # Note that igammac returns the upper regularized incomplete gamma # function Q(a, x), which is what we want for the CDF. return math_ops.igammac(self.concentration, self.rate / x)
def _cdf(self, x): x = control_flow_ops.with_dependencies([check_ops.assert_positive(x)] if self.validate_args else [], x) # Note that igammac returns the upper regularized incomplete gamma # function Q(a, x), which is what we want for the CDF. return math_ops.igammac(self.alpha, self.beta / x)
def _cdf(self, x): x = self._assert_valid_sample(x, check_integer=False) return math_ops.igammac(math_ops.floor(x + 1), self.lam)
def _cdf(self, x): if self.validate_args: x = distribution_util.embed_check_nonnegative_integer_form(x) return math_ops.igammac(1. + x, self.rate)