class_docstr: Logarithmic loss for distributional predictions.
  
  For a predictive distribution :math:`d` with pdf :math:`p_d`
  and a ground truth value :math:`y`, the logarithmic loss is
  defined as :math:`L(y, d) := -\log p_d(y)`.
  
  `evaluate` computes the average test sample loss.
  `evaluate_by_index` produces the loss sample by test data point
  `multivariate` controls averaging over variables.
  
  Parameters
  ----------
  multioutput : {'raw_values', 'uniform_average'} or array-like of shape \
          (n_outputs,), default='uniform_average'
      Defines whether and how to aggregate metric for across variables.
      If 'uniform_average' (default), errors are mean-averaged across variables.
      If array-like, errors are weighted averaged across variables, values as weights.
      If 'raw_values', does not average errors across variables, columns are retained.
  multivariate : bool, optional, default=False
      if True, behaves as multivariate log-loss
      log-loss is computed for entire row, results one score per row
      if False, is univariate log-loss
      log-loss is computed per variable marginal, results in many scores per row
class_docstr_tok: ["Logarithmic","loss","for","distributional","predictions",".","For","a","predictive","distribution",":","math",":","`","d","`","with","pdf",":","math",":","`","p_d","`","and","a","ground","truth","value",":","math",":","`","y","`",",","the","logarithmic","loss","is","defined","as",":","math",":","`","L","(","y",",","d",")",":","=","-\\log","p_d","(","y",")","`",".","`","evaluate","`","computes","the","average","test","sample","loss",".","`","evaluate_by_index","`","produces","the","loss","sample","by","test","data","point","`","multivariate","`","controls","averaging","over","variables",".","Parameters","--","--","--","--","--","multioutput",":","{","'raw_values","'",",","'uniform_average","'","}","or","array-like","of","shape","\\","(","n_outputs",",",")",",","default='uniform_average'","Defines","whether","and","how","to","aggregate","metric","for","across","variables",".","If","'uniform_average","'","(","default",")",",","errors","are","mean-averaged","across","variables",".","If","array-like",",","errors","are","weighted","averaged","across","variables",",","values","as","weights",".","If","'raw_values","'",",","does","not","average","errors","across","variables",",","columns","are","retained",".","multivariate",":","bool",",","optional",",","default=False","if","True",",","behaves","as","multivariate","log-loss","log-loss","is","computed","for","entire","row",",","results","one","score","per","row","if","False",",","is","univariate","log-loss","log-loss","is","computed","per","variable","marginal",",","results","in","many","scores","per","row"]
code: def _evaluate_by_index(self, y_true, y_pred, multioutput, **kwargs):
      res = -y_pred.log_pdf(y_true)
      # replace this by multivariate log_pdf once distr implements
      # i.e., pass multivariate on to log_pdf
      if self.multivariate:
          return pd.DataFrame(res.mean(axis=1), columns=["density"])
      else:
          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 LogLoss obj's underlying member method code with example usage: obj._evaluate_by_index(y_true, y_pred, multioutput) and returns: pd, res