gluonts.torch.modules.quantile_output module#

class gluonts.torch.modules.quantile_output.QuantileOutput(quantiles: List[float])[source]#

Bases: gluonts.torch.distributions.distribution_output.Output

Output layer using a quantile loss and projection layer to connect the quantile output to the network.

Parameters
  • quantiles – list of quantiles to compute loss over.

  • quantile_weights – weights of the quantiles.

args_dim: Dict[str, int]#
domain_map(quantiles_pred: torch.Tensor)[source]#
in_features: int#
quantile_loss(y_true: torch.Tensor, y_pred: torch.Tensor) torch.Tensor[source]#

Compute mean quantile loss.

Parameters
  • y_true – Ground truth values, shape [N_1, …, N_k]

  • y_pred – Predicted quantiles, shape [N_1, …, N_k num_quantiles]

Returns

Quantile loss, shape [N_1, …, N_k]

Return type

loss

property quantiles: List[float]#