class_docstr: Pinball loss aka quantile loss for quantile/interval predictions.
  
  Parameters
  ----------
  multioutput : string "uniform_average" or "raw_values" determines how        multioutput results will be treated.
  
  score_average : bool, optional, default = True
      specifies whether scores for each quantile should be averaged.
  
  alpha (optional) : float, list or np.ndarray, specifies what quantiles to         evaluate metric at.
  
  Examples
  --------
  >>> import numpy as np
  >>> import pandas as pd
  >>> from sktime.performance_metrics.forecasting.probabilistic import PinballLoss
  >>> y_true = pd.Series([3, -0.5, 2, 7, 2])
  >>> y_pred = pd.DataFrame({
  ...     ('Quantiles', 0.05): [1.25, 0, 1, 4, 0.625],
  ...     ('Quantiles', 0.5): [2.5, 0, 2, 8, 1.25],
  ...     ('Quantiles', 0.95): [3.75, 0, 3, 12, 1.875],
  ... })
  >>> pl = PinballLoss()
  >>> pl(y_true, y_pred)
  0.1791666666666667
  >>> pl = PinballLoss(score_average=False)
  >>> pl(y_true, y_pred).to_numpy()
  array([0.16625, 0.275  , 0.09625])
  >>> y_true = pd.DataFrame({
  ...     "Quantiles1": [3, -0.5, 2, 7, 2],
  ...     "Quantiles2": [4, 0.5, 3, 8, 3],
  ... })
  >>> y_pred = pd.DataFrame({
  ...     ('Quantiles1', 0.05): [1.5, -1, 1, 4, 0.65],
  ...     ('Quantiles1', 0.5): [2.5, 0, 2, 8, 1.25],
  ...     ('Quantiles1', 0.95): [3.5, 4, 3, 12, 1.85],
  ...     ('Quantiles2', 0.05): [2.5, 0, 2, 8, 1.25],
  ...     ('Quantiles2', 0.5): [5.0, 1, 4, 16, 2.5],
  ...     ('Quantiles2', 0.95): [7.5, 2, 6, 24, 3.75],
  ... })
  >>> pl = PinballLoss(multioutput='raw_values')
  >>> pl(y_true, y_pred).to_numpy()
  array([0.16233333, 0.465     ])
  >>> pl = PinballLoss(multioutput=np.array([0.3, 0.7]))
  >>> pl(y_true, y_pred)
  0.3742000000000001
class_docstr_tok: ["Pinball","loss","aka","quantile","loss","for","quantile\/interval","predictions",".","Parameters","--","--","--","--","--","multioutput",":","string","``","uniform_average","''","or","``","raw_values","''","determines","how","multioutput","results","will","be","treated",".","score_average",":","bool",",","optional",",","default","=","True","specifies","whether","scores","for","each","quantile","should","be","averaged",".","alpha","(","optional",")",":","float",",","list","or","np.ndarray",",","specifies","what","quantiles","to","evaluate","metric","at",".","Examples","--","--","--","--",">",">",">","import","numpy","as","np",">",">",">","import","pandas","as","pd",">",">",">","from","sktime.performance_metrics.forecasting.probabilistic","import","PinballLoss",">",">",">","y_true","=","pd.Series","(","[","3",",","-0.5",",","2",",","7",",","2","]",")",">",">",">","y_pred","=","pd.DataFrame","(","{","...","(","'Quantiles","'",",","0.05",")",":","[","1.25",",","0",",","1",",","4",",","0.625","]",",","...","(","'Quantiles","'",",","0.5",")",":","[","2.5",",","0",",","2",",","8",",","1.25","]",",","...","(","'Quantiles","'",",","0.95",")",":","[","3.75",",","0",",","3",",","12",",","1.875","]",",","...","}",")",">",">",">","pl","=","PinballLoss","(",")",">",">",">","pl","(","y_true",",","y_pred",")","0.1791666666666667",">",">",">","pl","=","PinballLoss","(","score_average=False",")",">",">",">","pl","(","y_true",",","y_pred",")",".to_numpy","(",")","array","(","[","0.16625",",","0.275",",","0.09625","]",")",">",">",">","y_true","=","pd.DataFrame","(","{","...","``","Quantiles1","''",":","[","3",",","-0.5",",","2",",","7",",","2","]",",","...","``","Quantiles2","''",":","[","4",",","0.5",",","3",",","8",",","3","]",",","...","}",")",">",">",">","y_pred","=","pd.DataFrame","(","{","...","(","'Quantiles1","'",",","0.05",")",":","[","1.5",",","-1",",","1",",","4",",","0.65","]",",","...","(","'Quantiles1","'",",","0.5",")",":","[","2.5",",","0",",","2",",","8",",","1.25","]",",","...","(","'Quantiles1","'",",","0.95",")",":","[","3.5",",","4",",","3",",","12",",","1.85","]",",","...","(","'Quantiles2","'",",","0.05",")",":","[","2.5",",","0",",","2",",","8",",","1.25","]",",","...","(","'Quantiles2","'",",","0.5",")",":","[","5.0",",","1",",","4",",","16",",","2.5","]",",","...","(","'Quantiles2","'",",","0.95",")",":","[","7.5",",","2",",","6",",","24",",","3.75","]",",","...","}",")",">",">",">","pl","=","PinballLoss","(","multioutput='raw_values","'",")",">",">",">","pl","(","y_true",",","y_pred",")",".to_numpy","(",")","array","(","[","0.16233333",",","0.465","]",")",">",">",">","pl","=","PinballLoss","(","multioutput=np.array","(","[","0.3",",","0.7","]",")",")",">",">",">","pl","(","y_true",",","y_pred",")","0.3742000000000001"]
code: def __init__(
      self,
      multioutput="uniform_average",
      score_average=True,
      alpha=None,
  ):
      self.score_average = score_average
      self.alpha = alpha
      self._alpha = self._check_alpha(alpha)
      self.metric_args = {"alpha": self._alpha}
      super().__init__(
          multioutput=multioutput, score_average=score_average
      )
  
imports: from logging import warning
  import numpy
  import pandas
  from pandas.api.types import is_numeric_dtype
  from sklearn.utils import check_array, check_consistent_length
  from sktime.datatypes import check_is_scitype, convert, convert_to
  from sktime.performance_metrics.forecasting._classes import BaseForecastingErrorMetric
  from sktime.performance_metrics.forecasting._coerce import _coerce_to_scalar
label_desc: Use image node_id 1 to create a new PinballLoss object from inherited base classes: _BaseProbaForecastingErrorMetric with example: obj = PinballLoss(multioutput, score_average, alpha)