torchtree.variational.chi#

Classes#

CUBO

Class representing the \(\chi\)-upper bound (CUBO) objective [1].

Module Contents#

class torchtree.variational.chi.CUBO(id_: torchtree.typing.ID, q: torchtree.distributions.distributions.DistributionModel, p: torchtree.core.model.CallableModel, samples: torch.Size, n: torch.Tensor)[source]#

Bases: torchtree.core.model.CallableModel

Class representing the \(\chi\)-upper bound (CUBO) objective [1].

Parameters:
  • id (str or None) – unique identifier of object.

  • q (DistributionModel) – variational distribution.

  • p (CallableModel) – joint distribution.

  • samples (torch.Size) – number of samples to form estimator.

  • n (torch.Tensor) – order of \(\chi\)-divergence.

q#
p#
n#
samples#
handle_parameter_changed(variable, index, event)[source]#
classmethod from_json(data, dic) CUBO[source]#

Abstract method to create object from a dictionary.

Parameters:
  • data (dict[str, Any]) – dictionary representation of a torchtree object.

  • dic (dict[str, Any]) – dictionary containing other torchtree objects keyed by their ID.

Returns:

torchtree object.

Return type:

Any