Skip to content
Advertisement

Inequality Constraint for a PYMC3 Model

I want to define an inequality constraint for a PYMC3 model. I found this post about defining an equality constraint (i.e., a+b1+b2=1) using pm.Potential. Does anyone know how to change that equality constraint into an inequality constraint like 0.9<a+b1+b2<1? Thanks!

Advertisement

Answer

The post you mention uses pm.math.eq which stands for “equal”. There are also pm.math.lt (lower than) and pm.math.le (lower or equal than). See the pymc3.math documentation

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement