mbi.Projectable

class mbi.Projectable(*args, **kwargs)[source]

Bases: Protocol

An object whose marginals can be computed over subsets of attributes.

Example projectables:
  • Dataset

  • Factor

  • CliqueVector

  • MarkovRandomField

  • MixtureOfProducts

  • JaxDataset

Methods

__init__

project

Projection onto a subset of attributes.

supports

Returns true if the given attributes can be projected onto.

Attributes

domain

Returns the domain over which this projectable is defined.

property domain: Domain

Returns the domain over which this projectable is defined.

project(attrs: Attribute | Sequence[Attribute]) → Factor[source]

Projection onto a subset of attributes.

supports(attrs: Attribute | Sequence[Attribute]) → bool[source]

Returns true if the given attributes can be projected onto.