mbi.Projectable

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

Bases: Protocol

A projectable is an object that can be projected onto a subset of attributes to compute a marginal.

Example projectables:
  • Dataset

  • Factor

  • CliqueVector

  • MarkovRandomField

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: str | Sequence[str]) Factor[source]

Projection onto a subset of attributes.

supports(attrs: str | Sequence[str]) bool[source]

Returns true if the given attributes can be projected onto.