class_docstr: Spliced Binned-Pareto univariate distribution.
  
  Arguments
  ----------
      bins_lower_bound: The lower bound of the bin edges
      bins_upper_bound: The upper bound of the bin edges
      numb_bins: The number of equidistance bins to allocate between
          `bins_lower_bound` and `bins_upper_bound`. Default value is 100.
      tail_percentile_gen_pareto: The percentile of the distribution that is
          each tail. Default value is 0.05. NB: This symmetric percentile
          can still represent asymmetric upper and lower tails.
class_docstr_tok: ["Spliced","Binned-Pareto","univariate","distribution",".","Arguments","--","--","--","--","--","bins_lower_bound",":","The","lower","bound","of","the","bin","edges","bins_upper_bound",":","The","upper","bound","of","the","bin","edges","numb_bins",":","The","number","of","equidistance","bins","to","allocate","between","`","bins_lower_bound","`","and","`","bins_upper_bound","`",".","Default","value","is","100.","tail_percentile_gen_pareto",":","The","percentile","of","the","distribution","that","is","each","tail",".","Default","value","is","0.05",".","NB",":","This","symmetric","percentile","can","still","represent","asymmetric","upper","and","lower","tails","."]
docstr: Inverse cdf of a tensor of quantile `quantiles`
  'quantiles' is of shape (*batch_shape) with values between (0.0, 1.0)
docstr_tok: ["Inverse","cdf","of","a","tensor","of","quantile","`","quantiles","`","'quantiles","'","is","of","shape","(","*","batch_shape",")","with","values","between","(","0.0",",","1.0",")"]
code: def _inverse_cdf(self, quantiles: torch.Tensor):
      """
      Inverse cdf of a tensor of quantile `quantiles`
      'quantiles' is of shape (*batch_shape) with values between (0.0, 1.0)
      """
  
      # The quantiles for the body of the distribution:
      icdf_body = self._icdf_binned(quantiles)
  
      # The quantiles if they are in the lower tail:
      adjusted_percentile_for_lower = 1 - (
          quantiles / self.tail_percentile_gen_pareto
      )
      icdf_lower = self._icdf_binned(
          torch.ones_like(quantiles) * self.tail_percentile_gen_pareto
      ) - self.lower_gen_pareto.icdf(adjusted_percentile_for_lower)
  
      # The quantiles if they are in the upper tail:
      adjusted_percentile_for_upper = (
          quantiles - (1.0 - self.tail_percentile_gen_pareto)
      ) / self.tail_percentile_gen_pareto
      icdf_upper = self.upper_gen_pareto.icdf(
          adjusted_percentile_for_upper
      ) + self._icdf_binned(
          torch.ones_like(quantiles)
          * (1 - self.tail_percentile_gen_pareto)
      )
  
      # Putting them together:
      icdf_value = icdf_body
  
      icdf_value = torch.where(
          quantiles < self.tail_percentile_gen_pareto,
          icdf_lower,
          icdf_value,
      )
  
      icdf_value = torch.where(
          quantiles > 1 - self.tail_percentile_gen_pareto,
          icdf_upper,
          icdf_value,
      )
  
      return icdf_value
  
file_path: gluonts/src/gluonts/torch/distributions/spliced_binned_pareto.py
imports: from typing import Dict, Optional, Tuple, cast
  import torch
  from torch.distributions import constraints
  from gluonts.core.component import validated
  from gluonts.torch.distributions import BinnedUniforms, GeneralizedPareto
  from .distribution_output import DistributionOutput
label_desc: Use image node_id 4 for calling the SplicedBinnedPareto obj's underlying member method code with example usage: obj._inverse_cdf(quantiles) and returns: icdf_value