base_metrics#

Base classes for metrics - only for inheritance.

Functions

convert_torchmetric_to_pytorch_forecasting_metric(metric)

If necessary, convert a torchmetric to a PyTorch Forecasting metric that works with PyTorch Forecasting models.

Classes

AggregationMetric(metric, **kwargs)

Calculate metric on mean prediction and actuals.

CompositeMetric([metrics, weights])

Metric that combines multiple metrics.

DistributionLoss([name, quantiles, reduction])

DistributionLoss base class.

Metric([name, quantiles, reduction])

Base metric class that has basic functions that can handle predicting quantiles and operate in log space.

MultiHorizonMetric([reduction])

Abstract class for defining metric for a multihorizon forecast

MultiLoss(metrics[, weights])

Metric that can be used with muliple metrics.

MultivariateDistributionLoss([name, ...])

Base class for multivariate distribution losses.

TorchMetricWrapper(torchmetric[, reduction])

Wrap a torchmetric to work with PyTorch Forecasting.