class_docstr: Intermediate base class for distributional prediction metrics/scores.
  
  Developer note:
  Experimental and overrides public methods of _BaseProbaForecastingErrorMetric.
  This should be refactored into one base class.
class_docstr_tok: ["Intermediate","base","class","for","distributional","prediction","metrics\/scores",".","Developer","note",":","Experimental","and","overrides","public","methods","of","_BaseProbaForecastingErrorMetric",".","This","should","be","refactored","into","one","base","class","."]
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 values.
  
  y_pred : sktime BaseDistribution of same shape as y_true
      Predictive distribution.
      Must have same index and columns as y_true.
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","values",".","y_pred",":","sktime","BaseDistribution","of","same","shape","as","y_true","Predictive","distribution",".","Must","have","same","index","and","columns","as","y_true","."]
code: def evaluate_by_index(
      self, y_true, y_pred, multioutput="uniform_average", **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 values.
  
          y_pred : sktime BaseDistribution of same shape as y_true
              Predictive distribution.
              Must have same index and columns as y_true.
          """
      multivariate = self.multivariate
  
      y_true = convert_to(y_true, to_type=PANDAS_DF_MTYPES)
  
      if multivariate:
          res = self._evaluate_by_index(
              y_true=y_true, y_pred=y_pred, multioutput=multioutput
          )
          res.columns = ["score"]
          return res
      else:
          res_by_col = []
          for col in y_pred.columns:
              y_pred_col = y_pred.loc[:, [col]]
              y_true_col = y_true.loc[:, [col]]
              res_for_col = self._evaluate_by_index(
                  y_true=y_true_col,
                  y_pred=y_pred_col,
                  multioutput=multioutput,
              )
              res_for_col.columns = [col]
              res_by_col += [res_for_col]
          res = pd.concat(res_by_col, axis=1)
  
      return res
  
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 _BaseDistrForecastingMetric obj's underlying member method code with example usage: obj.evaluate_by_index(y_true, y_pred, multioutput) and returns: res, res