Algorithms

class tramp.algos.ExpectationPropagation(model)[source]
class tramp.algos.StateEvolution(model)[source]

Initializations

class tramp.algos.ConstantInit(a=0, b=0)[source]
class tramp.algos.NoisyInit(a_mean=0, a_var=0, b_mean=0, b_var=1)[source]
class tramp.algos.CustomInit(a_init=None, b_init=None, a=0, b=0)[source]

Custom init on variables

Parameters
  • a_init (-) – Edges from/into variable.id and given direction will be initialized with a = a

  • b_init (-) – Edges from/into variable.id and given direction will be initialized with b = b

  • a (-) – Default constant value for a.

  • b (-) – Default constant value for b.

Callbacks

Callbacks for ExpectationPropagation and StateEvolution algorithms.

class tramp.algos.callbacks.Callback[source]
class tramp.algos.callbacks.EarlyStopping(ids='all', tol=1e-06, min_variance=- 1, wait_increase=5, max_increase=0.2)[source]
class tramp.algos.callbacks.EarlyStoppingEP(ids='all', tol=1e-06, wait_increase=5, max_increase=0.2)[source]
class tramp.algos.callbacks.JoinCallback(callbacks)[source]
class tramp.algos.callbacks.LogProgress(ids='all', every=1)[source]
class tramp.algos.callbacks.PassCallback[source]
class tramp.algos.callbacks.TrackErrors(true_values, metrics=['mse'], every=1, verbose=False)[source]
get_dataframe()[source]
class tramp.algos.callbacks.TrackEstimate(ids='all', every=1)[source]
get_dataframe()[source]
class tramp.algos.callbacks.TrackEvolution(ids='all', every=1, verbose=False)[source]
get_dataframe()[source]
class tramp.algos.callbacks.TrackMessages(keys=['a', 'n_iter', 'direction'])[source]
get_dataframe()[source]
class tramp.algos.callbacks.TrackObjective[source]
get_dataframe()[source]
class tramp.algos.callbacks.TrackOverlaps(true_values, ids='all', every=1, verbose=False)[source]
get_dataframe()[source]
tramp.algos.callbacks.norm(x)[source]