Friendly modelling API
PyMC3 allows you to write down models using an intuitive syntax to describe a data generating process.
Cutting edge algorithms and model building blocks
Fit your model using gradient-based MCMC algorithms like NUTS, using ADVI for fast approximate inference — including minibatch-ADVI for scaling to large datasets — or using Gaussian processes to build Bayesian nonparametric models.
import pymc3 as pm X, y = linear_training_data() with pm.Model() as linear_model: weights = pm.Normal("weights", mu=0, sigma=1) noise = pm.Gamma("noise", alpha=2, beta=1) y_observed = pm.Normal( "y_observed", mu=X @ weights, sigma=noise, observed=y, ) prior = pm.sample_prior_predictive() posterior = pm.sample() posterior_pred = pm.sample_posterior_predictive(posterior)
PyMC3 is licensed under the Apache License, V2.