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"]
docstr: Logic for finding the metric evaluated at each index.
  
  y_true : pd.Series, pd.DataFrame or np.array of shape (fh,) or             (fh, n_outputs) where fh is the forecasting horizon
      Ground truth (correct) target value`s.
  
  y_pred : pd.Series, pd.DataFrame or np.array of shape (fh,) or              (fh, n_outputs)  where fh is the forecasting horizon
      Forecasted values.
  
  multioutput : string "uniform_average" or "raw_values"
      Determines how multioutput results will be treated.
docstr_tok: ["Logic","for","finding","the","metric","evaluated","at","each","index",".","y_true",":","pd.Series",",","pd.DataFrame","or","np.array","of","shape","(","fh",",",")","or","(","fh",",","n_outputs",")","where","fh","is","the","forecasting","horizon","Ground","truth","(","correct",")","target","value","`","s",".","y_pred",":","pd.Series",",","pd.DataFrame","or","np.array","of","shape","(","fh",",",")","or","(","fh",",","n_outputs",")","where","fh","is","the","forecasting","horizon","Forecasted","values",".","multioutput",":","string","``","uniform_average","''","or","``","raw_values","''","Determines","how","multioutput","results","will","be","treated","."]
code: def _evaluate_by_index(self, y_true, y_pred, multioutput, **kwargs):
      """Logic for finding the metric evaluated at each index.
  
          y_true : pd.Series, pd.DataFrame or np.array of shape (fh,) or \
              (fh, n_outputs) where fh is the forecasting horizon
              Ground truth (correct) target value`s.
  
          y_pred : pd.Series, pd.DataFrame or np.array of shape (fh,) or  \
              (fh, n_outputs)  where fh is the forecasting horizon
              Forecasted values.
  
          multioutput : string "uniform_average" or "raw_values"
              Determines how multioutput results will be treated.
          """
      alpha = self._alpha
      y_pred_alphas = self._get_alpha_from(y_pred)
      if alpha is None:
          alphas = y_pred_alphas
      else:
          # if alpha was provided, check whether  they are predicted
          #   if not all alpha are observed, raise a ValueError
          if not np.isin(alpha, y_pred_alphas).all():
              # todo: make error msg more informative
              #   which alphas are missing
              msg = "not all quantile values in alpha are available in y_pred"
              raise ValueError(msg)
          else:
              alphas = alpha
  
      alphas = self._check_alpha(alphas)
  
      alpha_preds = y_pred.iloc[
          :, [x in alphas for x in y_pred.columns.get_level_values(1)]
      ]
  
      alpha_preds_np = alpha_preds.to_numpy()
      alpha_mat = np.repeat(
          (
              alpha_preds.columns.get_level_values(1)
              .to_numpy()
              .reshape(1, -1)
          ),
          repeats=y_true.shape[0],
          axis=0,
      )
  
      y_true_np = np.repeat(y_true, axis=1, repeats=len(alphas))
      diff = y_true_np - alpha_preds_np
      sign = (diff >= 0).astype(diff.dtype)
      loss = (
          alpha_mat * sign * diff - (1 - alpha_mat) * (1 - sign) * diff
      )
  
      out_df = pd.DataFrame(loss, columns=alpha_preds.columns)
  
      return out_df
  
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 2 for calling the PinballLoss obj's underlying member method code with example usage: obj._evaluate_by_index(y_true, y_pred, multioutput) and returns: out_df