Skip to content

pymc container generates many (seemingly irrelevant) deterministic parents and children #134

@emad2

Description

@emad2

I have a Bayesian network and to model it I am using containers. I have been trying to make sure that the parents/children connections are correct before I proceed, and I noticed that when using containers, pymc generates many deterministic variables that I have not defined myself. To see this, you can run the example in tutorial:

N = 10
x_0 = pymc.Normal('x_0', mu=0, tau=1)

x = np.empty(N, dtype=object)
x[0] = x_0

for i in range(1, N):
     x[i] = pymc.Normal('x_%i' % i, mu=x[i-1], tau=1)

@pymc.observed
def y(value=1, mu=x, tau=100):
    return pymc.normal_like(value, np.sum(mu**2), tau)

and then type
x[0].children
I see children of the form

pymc.PyMCObjects.Deterministic '(x_0_le_x_2)' at 0x11df54ef0

which I cannot justify. Is this normal? Would I get the same results if I fit a model but don't use containers?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions