pytorch_forecasting.metrics.
NormalDistributionLoss
Bases: pytorch_forecasting.metrics.DistributionLoss
pytorch_forecasting.metrics.DistributionLoss
Normal distribution loss.
not normalized in log space (use LogNormalDistributionLoss)
LogNormalDistributionLoss
not coerced to be positive
Initialize metric
name (str) – metric name. Defaults to class name.
quantiles (List[float], optional) – quantiles for probability range. Defaults to [0.02, 0.1, 0.25, 0.5, 0.75, 0.9, 0.98].
reduction (str, optional) – Reduction, “none”, “mean” or “sqrt-mean”. Defaults to “mean”.
Methods
map_x_to_distribution(x)
map_x_to_distribution
Map the a tensor of parameters to a probability distribution.
rescale_parameters(parameters, target_scale, …)
rescale_parameters
Rescale normalized parameters into the scale required for the distribution.
Attributes
distribution_arguments
distribution_class
alias of torch.distributions.normal.Normal
torch.distributions.normal.Normal
x (torch.Tensor) – parameters for probability distribution. Last dimension will index the parameters
class attribute distribution_class
distributions.Distribution
parameters (torch.Tensor) – normalized parameters (indexed by last dimension)
target_scale (torch.Tensor) – scale of parameters (n_batch_samples x (center, scale))
encoder (BaseEstimator) – original encoder that normalized the target in the first place
parameters in real/not normalized space
torch.Tensor