aepsych.likelihoods module

class aepsych.likelihoods.BernoulliObjectiveLikelihood(objective)[source]

Bases: _OneDimensionalLikelihood

Bernoulli likelihood with a flexible link (objective) defined by a callable (which can be a botorch objective)

Initializes internal Module state, shared by both nn.Module and ScriptModule.


objective (Callable) –

forward(function_samples, **kwargs)[source]

Computes the conditional distribution \(p(\mathbf y \mid \mathbf f, \ldots)\) that defines the likelihood.

  • function_samples (torch.Tensor) – Samples from the function (\(\mathbf f\))

  • data (dict {str: torch.Tensor}, optional - Pyro integration only) – Additional variables that the likelihood needs to condition on. The keys of the dictionary will correspond to Pyro sample sites in the likelihood’s model/guide.

  • args – Additional args

  • kwargs – Additional kwargs

Return type

Distribution (with same shape as function_samples )

classmethod from_config(config)[source]

config (Config) –

training: bool