bayespy.inference.VB

class bayespy.inference.VB(*nodes, tol=1e-05, autosave_filename=None, autosave_iterations=0, use_logging=False, user_data=None, callback=None)[source]

Variational Bayesian (VB) inference engine

Parameters:
nodes : nodes

Nodes that form the model. Must include all at least all stochastic nodes of the model.

tol : double, optional

Convergence criterion. Tolerance for the relative change in the VB lower bound.

autosave_filename : string, optional

Filename for automatic saving

autosave_iterations : int, optional

Iteration interval between each automatic saving

callback : callable, optional

Function which is called after each update iteration step

__init__(*nodes, tol=1e-05, autosave_filename=None, autosave_iterations=0, use_logging=False, user_data=None, callback=None)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(*nodes[, tol, autosave_filename, …]) Initialize self.
add(x1, x2[, scale]) Add two vectors (in parameter format)
compute_lowerbound([ignore_masked])
compute_lowerbound_terms(*nodes)
dot(x1, x2) Computes dot products of given vectors (in parameter format)
get_gradients(*nodes[, euclidian]) Computes gradients (both Riemannian and normal)
get_iteration_by_nodes()
get_parameters(*nodes) Get parameters of the nodes
gradient_step(*nodes[, scale]) Update nodes by taking a gradient ascent step
has_converged([tol])
load(*nodes[, filename, nodes_only])
load_user_data()
loglikelihood_lowerbound()
optimize(*nodes[, maxiter, verbose, method, …]) Optimize nodes using Riemannian conjugate gradient
pattern_search(*nodes[, collapsed, maxiter]) Perform simple pattern search [4].
plot(*nodes, **kwargs) Plot the distribution of the given nodes (or all nodes)
plot_iteration_by_nodes([axes, diff]) Plot the cost function per node during the iteration.
save(*nodes[, filename])
set_annealing(annealing) Set deterministic annealing from range (0, 1].
set_autosave(filename[, iterations, nodes])
set_callback(callback)
set_parameters(x, *nodes) Set parameters of the nodes
update(*nodes[, repeat, plot, tol, verbose, …])
use_logging(use)

Attributes

ignore_bound_checks