def _quantile(self, p): loc = tf.convert_to_tensor(self.loc) scale = tf.convert_to_tensor(self.scale) power = tf.convert_to_tensor(self.power) ipower = tf.math.reciprocal(power) quantile = tf.where( p < 0.5, loc - tf.math.pow(tfp_math.igammacinv(ipower, 2. * p), ipower) * scale, loc + tf.math.pow(tfp_math.igammainv(ipower, 2. * p - 1.), ipower) * scale) return quantile
def _quantile(self, p): return tf.math.reciprocal(tfp_math.igammacinv(self.concentration, p)) * self.scale