class_docstr: Distribution class for the Incremental (Spline) Quantile Function in the
  paper ``Learning Quantile Functions without Quantile Crossing for
  Distribution-free Time Series Forecasting``
  by Park, Robinson, Aubet, Kan, Gasthaus, Wang
  Parameters
  ----------
  spline_knots, spline_heights
      Tensor parametrizing the x-positions (y-positions) of the spline knots
      Shape: (*batch_shape, (num_qk-1), num_pieces)
  qk_x, qk_y
      Tensor containing the increasing x-positions (y-positions) of the
      quantile knots, Shape: (*batch_shape, num_qk)
  beta_l, beta_r
      Tensor containing the non-negative learnable parameter of the
      left (right) tail, Shape: (*batch_shape,)
class_docstr_tok: ["Distribution","class","for","the","Incremental","(","Spline",")","Quantile","Function","in","the","paper","``","Learning","Quantile","Functions","without","Quantile","Crossing","for","Distribution-free","Time","Series","Forecasting","``","by","Park",",","Robinson",",","Aubet",",","Kan",",","Gasthaus",",","Wang","Parameters","--","--","--","--","--","spline_knots",",","spline_heights","Tensor","parametrizing","the","x-positions","(","y-positions",")","of","the","spline","knots","Shape",":","(","*","batch_shape",",","(","num_qk-1",")",",","num_pieces",")","qk_x",",","qk_y","Tensor","containing","the","increasing","x-positions","(","y-positions",")","of","the","quantile","knots",",","Shape",":","(","*","batch_shape",",","num_qk",")","beta_l",",","beta_r","Tensor","containing","the","non-negative","learnable","parameter","of","the","left","(","right",")","tail",",","Shape",":","(","*","batch_shape",",",")"]
code: def __init__(
      self,
      spline_knots: torch.Tensor,
      spline_heights: torch.Tensor,
      beta_l: torch.Tensor,
      beta_r: torch.Tensor,
      qk_y: torch.Tensor,
      qk_x: torch.Tensor,
      tol: float = 1e-4,
      validate_args: bool = False,
  ) -> None:
      self.num_qk, self.num_pieces = (
          qk_y.shape[-1],
          spline_knots.shape[-1],
      )
      self.spline_knots, self.spline_heights = (
          spline_knots,
          spline_heights,
      )
      self.beta_l, self.beta_r = beta_l, beta_r
      self.qk_y_all = qk_y
      self.tol = tol
  
      super().__init__(
          batch_shape=self.batch_shape, validate_args=validate_args
      )
  
      # Get quantile knots (qk) parameters
      (
          self.qk_x,
          self.qk_x_plus,
          self.qk_x_l,
          self.qk_x_r,
      ) = ISQF.parameterize_qk(qk_x)
      (
          self.qk_y,
          self.qk_y_plus,
          self.qk_y_l,
          self.qk_y_r,
      ) = ISQF.parameterize_qk(qk_y)
  
      # Get spline knots (sk) parameters
      self.sk_y, self.delta_sk_y = ISQF.parameterize_spline(
          self.spline_heights,
          self.qk_y,
          self.qk_y_plus,
          self.tol,
      )
      self.sk_x, self.delta_sk_x = ISQF.parameterize_spline(
          self.spline_knots,
          self.qk_x,
          self.qk_x_plus,
          self.tol,
      )
  
      if self.num_pieces > 1:
          self.sk_x_plus = torch.cat(
              [self.sk_x[..., 1:], self.qk_x_plus.unsqueeze(dim=-1)],
              dim=-1,
          )
      else:
          self.sk_x_plus = self.qk_x_plus.unsqueeze(dim=-1)
  
      # Get tails parameters
      self.tail_al, self.tail_bl = ISQF.parameterize_tail(
          self.beta_l, self.qk_x_l, self.qk_y_l
      )
      self.tail_ar, self.tail_br = ISQF.parameterize_tail(
          -self.beta_r, 1 - self.qk_x_r, self.qk_y_r
      )
  
imports: from typing import Dict, List, Optional, Tuple
  import torch
  import torch.nn.functional
  from torch.distributions import AffineTransform, TransformedDistribution
  from gluonts.core.component import validated
  from .distribution_output import DistributionOutput
label_desc: Use image node_id 1 to create a new ISQF object from inherited base classes: torch.distributions with example: obj = ISQF(spline_knots, spline_heights, beta_l, beta_r, qk_y, qk_x, tol, validate_args)