mbi package

Top-Level Classes

Domain

Represents a discrete domain defined by attributes and their sizes.

Dataset

A discrete tabular dataset backed by a dictionary of 1D numpy arrays.

Factor

Represents a factor defined over a discrete domain.

CliqueVector

Manages a collection of factors, each associated with a clique.

Projectable

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

MarginalLossFn

A loss function over the concatenated vector of marginals.

LinearMeasurement

A class for representing a private linear measurement of a marginal.

MarginalOracle

Callable signature for stateless marginal oracle functions.

MarkovRandomField

Represents a learned graphical model.

Estimator

An object that estimates a Model from a marginal-based loss function.

Constraint

A structural constraint on allowed value combinations.

Top-Level Functions

save

Save a JAX pytree to .npz format.

load

Load a JAX pytree from .npz format.

summarize

Return a structured summary of the model.

set_log_fn

Override the library-wide log function (default: print).

Modules

marginal_oracles

Marginal oracles for computing marginals from graphical model potentials.

marginal_loss

Defines loss functions based on linear measurements of marginals.

estimation

Algorithms for estimating graphical models from marginal-based loss functions.

approximate_oracles

Approximate marginal oracles with convex counting numbers.

callbacks

Defines callback mechanisms for monitoring optimization processes.

junction_tree

Utilities for constructing and working with junction trees.

extensions

Extensions for mbi providing alternative estimation approaches.