Skip to content

Commit ad799f0

Browse files
committed
add arbitrary potentials
1 parent 0cb372d commit ad799f0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pymc/model.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ def TransformedVar(model, name, dist, trans):
108108
tvar = model.Var(trans.name + '_' + name, trans.apply(dist))
109109
return trans.backward(tvar), tvar
110110

111+
def AddPotential(model, potential):
112+
model.factors.append(potential)
113+
111114
withmodel = withcontext(Model, 'model')
112115

113116

0 commit comments

Comments
 (0)