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

class gluonts.nursery.few_shot_prediction.src.meta.metrics.crps.CRPS(quantiles: List[str], rescale: bool = False, 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

Same as mean_weighted_quantile_loss in meta.evaluation.metrics just for pytorch

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, scales: Optional[torch.Tensor] = None) None[source]#

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