bellini.distributions.SimpleDistribution

class bellini.distributions.SimpleDistribution(*args, **kwargs)[source]

Bases: bellini.distributions.Distribution

Base class for all distributions that can be directly sampled from in any Bellini backend

__init__(*args, **kwargs)[source]
Parameters
  • observed (bool, default=False) – If the current node is observable (should only be True on `SimpleDistribution`s)

  • name (str) – Name of the node, used as a label when samples are drawn

  • **parameters – Any associated parameters in the Distribution

Methods

__init__(*args, **kwargs)

Parameters
  • observed (bool, default=False) -- If the current node is observable (should only be True on

to_units(new_units[, force])

Return self converted to units new_units

unitless()

Return a unitless version of self

Attributes

dimensionality

The Distribution's dimensionality (e.g.

g

A networkx graph describing the computation graph used to create this Distribution

internal_units

The units associated with internal computations in Bellini for this Distribution

magnitude

A quantity (array-like or scalar) with the same shape as expected samples from this Distribution

name

A string representing the name of self

shape

The shape of samples from this Distribution

units

The units of this Distribution (e.g.

abstract property dimensionality

The Distribution’s dimensionality (e.g. ‘length’ for meter)

property g

A networkx graph describing the computation graph used to create this Distribution

abstract property internal_units

The units associated with internal computations in Bellini for this Distribution

abstract property magnitude

A quantity (array-like or scalar) with the same shape as expected samples from this Distribution

property name

A string representing the name of self

property shape

The shape of samples from this Distribution

abstract to_units(new_units, force=False)

Return self converted to units new_units

abstract unitless()

Return a unitless version of self

abstract property units

The units of this Distribution (e.g. molar)