class_docstr: Multivariate quantile loss based on the article
  `Multivariate Quantile Function Forecaster <http://arxiv.org/abs/2202.11316>`_.
  
  Requires install of additional library:
  ``pip install pytorch-forecasting[mqf2]``
class_docstr_tok: ["Multivariate","quantile","loss","based","on","the","article","`","Multivariate","Quantile","Function","Forecaster","<","http",":","\/\/arxiv.org\/abs\/2202.11316",">","`","_",".","Requires","install","of","additional","library",":","``","pip","install","pytorch-forecasting","[","mqf2","]","``"]
docstr: Calculate negative likelihood
  
  Args:
      y_pred: network output
      y_actual: actual values
  
  Returns:
      torch.Tensor: metric value on which backpropagation can be applied
docstr_tok: ["Calculate","negative","likelihood","Args",":","y_pred",":","network","output","y_actual",":","actual","values","Returns",":","torch.Tensor",":","metric","value","on","which","backpropagation","can","be","applied"]
code: def loss(
      self, y_pred: torch.Tensor, y_actual: torch.Tensor
  ) -> torch.Tensor:
      """
      Calculate negative likelihood
  
      Args:
          y_pred: network output
          y_actual: actual values
  
      Returns:
          torch.Tensor: metric value on which backpropagation can be applied
      """
      distribution = self.map_x_to_distribution(y_pred)
      if self.is_energy_score:
          loss = distribution.energy_score(y_actual)
      else:
          loss = -distribution.log_prob(y_actual)
      return loss.reshape(-1, 1)
  
imports: from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import numpy
  from sklearn.base import BaseEstimator
  import torch
  from torch import distributions, nn
  import torch.nn.functional
  from pytorch_forecasting.data.encoders import TorchNormalizer, softplus_inv
  from pytorch_forecasting.metrics.base_metrics import DistributionLoss, MultivariateDistributionLoss
label_desc: Use image node_id 4 for calling the MQF2DistributionLoss obj's underlying member method code with example usage: obj.loss(y_pred, y_actual) and returns: loss