Skip to main content

core.Predictive

core.Predictive()

Turns a posterior B and inputs into a distribution over targets.

Attributes

Name Description
requires What the predictive needs from the model and the likelihood.

Methods

Name Description
call The predictive distribution at inputs.

call

core.Predictive.__call__(posterior, inputs, /, *, generator=None)

The predictive distribution at inputs.

Parameters

Name Type Description Default
posterior B The posterior, of a type this predictive accepts. required
inputs Inputs Inputs, as the model’s forward takes them. required
generator torch.Generator | None The generator for sampled predictives to draw with. None means torch’s global RNG. lk.predict passes a fresh one on the inputs’ device. None

Returns

Name Type Description
Distribution A distribution over targets, one per example.