Skip to content

Define model definition #1

@EiffL

Description

@EiffL

The first step is to define how a model will be specified to the engine. To get the ball rolling, here is how pyMC3 defines a model and runs inference:

with pm.Model() as model:
    mu = pm.Normal('mu', mu=0, sd=1)
    obs = pm.Normal('observations', mu=mu, sd=0.1, observed=y)
    trace = sample(2000, cores=2)  # Automatically runs the inference using NUTS

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