gluonts.nursery.few_shot_prediction.src.meta.metrics.quantile_width module#

class gluonts.nursery.few_shot_prediction.src.meta.metrics.quantile_width.QuantileWidth(quantiles: List[str], compute_on_step: bool = True, dist_sync_on_step: bool = False, process_group: Optional[Any] = None, dist_sync_fn: Optional[Callable] = None)[source]#

Bases: torchmetrics.metric.Metric

Computes the quantile loss.

Parameters

quantiles (The quantiles.) –

compute() torch.Tensor[source]#

Override this method to compute the final metric value from state variables synchronized across the distributed backend.

update(y_pred: torch.Tensor, y_true: torch.Tensor, mask: torch.Tensor) None[source]#

Override this method to update the state variables of your metric class.