neuralop.losses.data_losses.PointwiseQuantileLoss
- class neuralop.losses.data_losses.PointwiseQuantileLoss(alpha, reduction='sum')[source]
PointwiseQuantileLoss computes Quantile Loss.
It is used for uncertainty quantification of Neural Operators, as described in [1].
- Parameters:
- alphafloat
value, between 0 and 1, of the proportion of points in the output domain expected to fall within predicted quantiles
- reductionstr, optional
whether to reduce across the batch and channel dimensions by summing (‘sum’) or averaging (‘mean’)
- .. warning::
PointwiseQuantileLoss always averages over the spatial dimensions. reduction only applies to the batch and channel dimensions.
Methods
__call__(y_pred, y[, eps])y_pred : torch.tensor
reduce_all(x)reduce x across the batch according to self.reduction
References
[1]Ma, Z., Pitt, D., Azizzadenesheli, K., Anandkumar, A., (2024). Calibrated Uncertainty Quantification for Operator Learning via Conformal Prediction TMLR 2024, https://openreview.net/pdf?id=cGpegxy12T
- reduce_all(x)[source]
reduce x across the batch according to self.reduction
- Parameters:
- x: torch.Tensor
inputs