Example #1
0
    def ppf(self, x):
        """
        Computes the percent point function of the distribution at the point(s)
        x. It is defined as the inverse of the CDF. y = ppf(x) can be
        interpreted as the argument y for which the value of the cdf(x) is equal
        to y. Essentially that means the random varable y is the place on the
        distribution the CDF evaluates to x.

        Parameters
        ----------
        x: array, dtype=float, shape=(m x n), bounds=(0,1)
            The value(s) at which the user would like the ppf evaluated.
            If an array is passed in, the ppf is evaluated at every point
            in the array and an array of the same size is returned.

        Returns
        -------
        ppf: array, dtype=float, shape=(m x n)
            The ppf at each point in x.
        """
        vals = np.ceil(pdtrik(x, self.lamb))
        vals1 = vals - 1
        temp = pdtr(vals1, self.lamb)
        ppf = np.where((temp >= x), vals1, vals)

        return ppf
Example #2
0
def pdtrik_comp(p, m):
    return pdtrik(1-p, m)
 def _ppf(self, q, mu):
     vals = ceil(special.pdtrik(q, mu))
     vals1 = np.maximum(vals - 1, 0)
     temp = special.pdtr(vals1, mu)
     return np.where(temp >= q, vals1, vals)
Example #4
0
 def _ppf(self, q, mu):
     vals = ceil(special.pdtrik(q, mu))
     vals1 = vals-1
     temp = special.pdtr(vals1, mu)
     return np.where((temp >= q), vals1, vals)
Example #5
0
def pdtrik_comp(p, m):
    return pdtrik(1 - p, m)
 def _ppf(self, q, mu):
     vals = ceil(special.pdtrik(q, mu))
     vals1 = np.maximum(vals - 1, 0)
     temp = special.pdtr(vals1, mu)
     return np.where(temp >= q, vals1, vals)