docstr: Compute percentiles of a distribution using various tail stopping rules.
  
  Parameters
  ----------
  k_depth: "tukey", "proportion", "trustworthy", or "full"
      Stopping rule for choosing tail percentiled to show:
  
      - tukey: Show a similar number of outliers as in a conventional boxplot.
      - proportion: Show approximately `outlier_prop` outliers.
      - trust_alpha: Use `trust_alpha` level for most extreme tail percentile.
  
  outlier_prop: float
      Parameter for `k_depth="proportion"` setting the expected outlier rate.
  trust_alpha: float
      Parameter for `k_depth="trustworthy"` setting the confidence threshold.
  
  Notes
  -----
  Based on the proposal in this paper:
  https://vita.had.co.nz/papers/letter-value-plot.pdf
docstr_tok: ["Compute","percentiles","of","a","distribution","using","various","tail","stopping","rules",".","Parameters","--","--","--","--","--","k_depth",":","``","tukey","''",",","``","proportion","''",",","``","trustworthy","''",",","or","``","full","''","Stopping","rule","for","choosing","tail","percentiled","to","show",":","-","tukey",":","Show","a","similar","number","of","outliers","as","in","a","conventional","boxplot",".","-","proportion",":","Show","approximately","`","outlier_prop","`","outliers",".","-","trust_alpha",":","Use","`","trust_alpha","`","level","for","most","extreme","tail","percentile",".","outlier_prop",":","float","Parameter","for","`","k_depth=","''","proportion","''","`","setting","the","expected","outlier","rate",".","trust_alpha",":","float","Parameter","for","`","k_depth=","''","trustworthy","''","`","setting","the","confidence","threshold",".","Notes","--","--","-","Based","on","the","proposal","in","this","paper",":","https",":","\/\/vita.had.co.nz\/papers\/letter-value-plot.pdf"]
code: def __init__(self, k_depth, outlier_prop, trust_alpha):
      """
      Compute percentiles of a distribution using various tail stopping rules.
  
      Parameters
      ----------
      k_depth: "tukey", "proportion", "trustworthy", or "full"
          Stopping rule for choosing tail percentiled to show:
  
          - tukey: Show a similar number of outliers as in a conventional boxplot.
          - proportion: Show approximately `outlier_prop` outliers.
          - trust_alpha: Use `trust_alpha` level for most extreme tail percentile.
  
      outlier_prop: float
          Parameter for `k_depth="proportion"` setting the expected outlier rate.
      trust_alpha: float
          Parameter for `k_depth="trustworthy"` setting the confidence threshold.
  
      Notes
      -----
      Based on the proposal in this paper:
      https://vita.had.co.nz/papers/letter-value-plot.pdf
  
      """
      k_options = ["tukey", "proportion", "trustworthy", "full"]
      if isinstance(k_depth, str):
          _check_argument("k_depth", k_options, k_depth)
      elif not isinstance(k_depth, int):
          err = (
              "The `k_depth` parameter must be either an integer or string "
              f"(one of {k_options}), not {k_depth!r}."
          )
          raise TypeError(err)
  
      self.k_depth = k_depth
      self.outlier_prop = outlier_prop
      self.trust_alpha = trust_alpha
  
imports: from numbers import Number
  from statistics import NormalDist
  import numpy
  import pandas
  from .algorithms import bootstrap
  from .utils import _check_argument
label_desc: Use image node_id 1 to create a new LetterValues object  with example: obj = LetterValues(k_depth, outlier_prop, trust_alpha)