Skip to content

Bernoulli¤

distreqx.distributions.Bernoulli(distreqx.distributions.AbstractSampleLogProbDistribution, distreqx.distributions.AbstractSTDDistribution, distreqx.distributions.AbstractSurvivalDistribution) ¤

Bernoulli distribution of shape dims.

Bernoulli distribution with parameter probs, the probability of outcome 1.

__init__(logits: Array | None = None, probs: Array | None = None) ¤

Initializes a Bernoulli distribution.

Arguments:

  • logits: Logit transform of the probability of a 1 event (0 otherwise), i.e. probs = sigmoid(logits). Only one of logits or probs can be specified.
  • probs: Probability of a 1 event (0 otherwise). Only one of logits or probs can be specified.