ProbabilityDistribution

class maze.distributions.distribution.ProbabilityDistribution

Base class for all probability distributions.

deterministic_sample() → Any

Draw a deterministic sample from the probability distribution.

Returns

deterministic sample tensor.

entropy() → Any

Calculate the entropy of the probability distribution.

Returns

entropy tensor.

kl(other: maze.distributions.distribution.ProbabilityDistribution) → Any

Calculates the Kullback-Leibler between self and the other probability distribution.

Parameters

other – ([float]) the distribution to compare with.

Returns

kl tensor.

log_prob(actions: Any) → Any

Returns the the log likelihood of the provided actions.

actions: the actions. :return: log likelihood tensor.

neg_log_prob(actions: Any) → Any

Returns the the negative log likelihood of the provided actions.

Parameters

actions – the actions.

Returns

negative log likelihood tensor.

sample() → Any

Draw a sample from the probability distribution.

Returns

stochastic sample tensor.