variational Package

variational Package

Code for variational inference

dirichlet_process Module

See Blei, Jordan - Variational Methods for Dirichlet Processes

class infpy.variational.dirichlet_process.ExpFamilyDP(X, K, alpha, family, lambda_)[source]

Bases: object

Implements a variational algorithm for inference in a dirichlet process mixture model of exponential family distributions.

K = None

Variational # mixtures truncation parameter.

N = None

# of data.

alpha = None

Dirichlet process parameter.

data = None

The data as sufficient statistics.

expected_theta()[source]

Expected value of theta under the variational distribution.

family = None

Exponential family.

gamma = None

The variational parameters for the V’s (array of shape (K,2)).

initialise_variational_parameters()[source]

Set the variational parameters to some starting point.

lambda_ = None

Conjugate prior parameter.

log_likelihood()[source]

The log likelihood of the data.

p_T(T)[source]

The pdf of the variational density at T.

@param T: sufficient statistic

p_z_given_T(T)[source]

The pdf of variational density at z given T as an array over all z’s

@param T: sufficient statistic

phi = None

The variational parameters for the Z’s (array of shape (N,2)).

tau = None

The variational parameters for the eta’s (array of length K).

tau_0 = None

The pseudo count variational parameters for the eta’s (array of length K).

update()[source]

Perform one update step.

update_gamma()[source]

Update gamma

update_phi()[source]

Update phi.

update_tau()[source]

Update tau

Table Of Contents

Previous topic

test Package

Next topic

message_passing Package

This Page