Open jenkoj opened 6 months ago
Noticed discrepancy related to metric definition. RMSE is actually MSE, which makes sense as RMSE tends to be very unstable.
Definiton:
class RMSE(MultiHorizonMetric): """ Root mean square error Defined as ``(y_pred - target)**2`` """ def __init__(self, reduction="sqrt-mean", **kwargs): super().__init__(reduction=reduction, **kwargs) def loss(self, y_pred: Dict[str, torch.Tensor], target): loss = torch.pow(self.to_prediction(y_pred) - target, 2) return loss
source: https://github.com/jdb78/pytorch-forecasting/blob/68a0eb5f1701801142ce976fa50305b29507845a/pytorch_forecasting/metrics/point.py#L137C1-L149C20
The documentation isn't very clear, but I believe the root is applied by the reduction function, thus making it RMSE. A bit risky since the reduction function doesn't have to be "sqrt-mean"...
"sqrt-mean"
Noticed discrepancy related to metric definition. RMSE is actually MSE, which makes sense as RMSE tends to be very unstable.
Definiton:
source: https://github.com/jdb78/pytorch-forecasting/blob/68a0eb5f1701801142ce976fa50305b29507845a/pytorch_forecasting/metrics/point.py#L137C1-L149C20