class_docstr: Base probability distribution.
docstr: Quantile function = percent point function = inverse cdf.
docstr_tok: ["Quantile","function","=","percent","point","function","=","inverse","cdf","."]
code: def ppf(self, p):
      """Quantile function = percent point function = inverse cdf."""
      if self._has_implementation_of("cdf"):
          from scipy.optimize import bisect
  
          max_iter = self.get_tag("bisect_iter")
          approx_method = (
              "by using the bisection method (scipy.optimize.bisect) on "
              f"the cdf, at {max_iter} maximum iterations"
          )
          warn(self._method_error_msg("cdf", fill_in=approx_method))
  
          result = pd.DataFrame(
              index=p.index, columns=p.columns, dtype="float"
          )
          for ix in p.index:
              for col in p.columns:
                  d_ix = self.loc[[ix], [col]]
                  p_ix = p.loc[ix, col]
  
                  def opt_fun(x):
                      """Optimization function, to find x s.t. cdf(x) = p_ix."""
                      x = pd.DataFrame(
                          x, index=[ix], columns=[col]
                      )  # noqa: B023
                      return (
                          d_ix.cdf(x).values[0][0] - p_ix
                      )  # noqa: B023
  
                  left_bd = -1e6
                  right_bd = 1e6
                  while opt_fun(left_bd) > 0:
                      left_bd *= 10
                  while opt_fun(right_bd) < 0:
                      right_bd *= 10
                  result.loc[ix, col] = bisect(
                      opt_fun, left_bd, right_bd, maxiter=max_iter
                  )
          return result
  
      raise NotImplementedError(self._method_error_msg("ppf", "error"))
  
imports: from warnings import warn
  import numpy
  import pandas
  from sktime.base import BaseObject
  from sktime.utils.pandas import df_map
  from sktime.utils.validation._dependencies import _check_estimator_deps
label_desc: Use image node_id 15 for calling the BaseDistribution obj's underlying member method code with example usage: obj.ppf(p) and returns: result, unknown