Skip to content

← distributions package

DistributionProperty

Get a specified property of the given distribution.

The available properties include the event and batch shape, whether the distribution is discrete or symmetric, and whether the distribution is fully reparameterized. See option parameter for more details. Version 1.0.0

Ports/Properties

dist

Distribution to use.

  • verbose name: Dist
  • default value: None
  • port type: DataPort
  • value type: Distribution (can be None)
  • data direction: IN

value

Resulting value.

  • verbose name: Value
  • default value: None
  • port type: DataPort
  • value type: object (can be None)
  • data direction: OUT

option

The property to look up. The available properties are as follows: event_shape is a list of dimensions of the event space of the distribution (if the distribution is multivariate, otherwise []), batch_shape is a list of dimensions of the batch of distributions (if the distribution is a batch of distributions with different parameters, otherwise []), is_discrete is True if the distribution is discrete, shape is the full shape of the distribution (batch_shape + event_shape), and is_reparameterized is True if the distribution is reparameterized, meaning that gradients of a draw from the distribution with respect to the distribution's parameters are well-defined and can be computed.

  • verbose name: Option
  • default value: event_shape
  • port type: EnumPort
  • value type: str (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

  • verbose name: Set Breakpoint (Debug Only)
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

  • verbose name: Metadata
  • default value: {}
  • port type: DictPort
  • value type: dict (can be None)