TransformedMQF2Distribution#

class pytorch_forecasting.metrics._mqf2_utils.TransformedMQF2Distribution(base_distribution: MQF2Distribution, transforms: list[AffineTransform], validate_args: bool = False)[source]#

Bases: TransformedDistribution

Inherited-members:

Methods

cdf(value)

Computes the cumulative distribution function by inverting the transform(s) and computing the score of the base distribution.

energy_score(y)

entropy()

Returns entropy of distribution, batched over batch_shape.

enumerate_support([expand])

Returns tensor containing all values supported by a discrete distribution.

expand(batch_shape[, _instance])

Returns a new distribution instance (or populates an existing instance provided by a derived class) with batch dimensions expanded to batch_shape.

icdf(value)

Computes the inverse cumulative distribution function using transform(s) and computing the score of the base distribution.

log_prob(y)

Scores the sample by inverting the transform(s) and computing the score using the score of the base distribution and the log abs det jacobian.

perplexity()

Returns perplexity of distribution, batched over batch_shape.

quantile(alpha[, hidden_state])

repeat_scale(scale)

rsample([sample_shape])

Generates a sample_shape shaped reparameterized sample or sample_shape shaped batch of reparameterized samples if the distribution parameters are batched.

sample([sample_shape])

Generates a sample_shape shaped sample or sample_shape shaped batch of samples if the distribution parameters are batched.

sample_n(n)

Generates n samples or n batches of samples if the distribution parameters are batched.

scale_input(y)

set_default_validate_args(value)

Sets whether validation is enabled or disabled.

Attributes

arg_constraints

batch_shape

Returns the shape over which parameters are batched.

event_shape

Returns the shape of a single sample (without batching).

has_enumerate_support

has_rsample

bool(x) -> bool

mean

Returns the mean of the distribution.

mode

Returns the mode of the distribution.

stddev

Returns the standard deviation of the distribution.

support

Returns a Constraint object representing this distribution's support.

variance

Returns the variance of the distribution.

log_prob(y: Tensor) Tensor[source]#

Scores the sample by inverting the transform(s) and computing the score using the score of the base distribution and the log abs det jacobian.