Abril-Pla Oriol, Andreani Virgile, Carroll Colin, Dong Larry, Fonnesbeck Christopher J, Kochurov Maxim, Kumar Ravin, Lao Junpeng, Luhmann Christian C, Martin Osvaldo A, Osthege Michael, Vieira Ricardo, Wiecki Thomas, Zinkov Robert
ArviZ-Devs, Barcelona, Spain.
Biomedical Engineering Department, Boston University, Boston, United States of America.
PeerJ Comput Sci. 2023 Sep 1;9:e1516. doi: 10.7717/peerj-cs.1516. eCollection 2023.
PyMC is a probabilistic programming library for Python that provides tools for constructing and fitting Bayesian models. It offers an intuitive, readable syntax that is close to the natural syntax statisticians use to describe models. PyMC leverages the symbolic computation library PyTensor, allowing it to be compiled into a variety of computational backends, such as C, JAX, and Numba, which in turn offer access to different computational architectures including CPU, GPU, and TPU. Being a general modeling framework, PyMC supports a variety of models including generalized hierarchical linear regression and classification, time series, ordinary differential equations (ODEs), and non-parametric models such as Gaussian processes (GPs). We demonstrate PyMC's versatility and ease of use with examples spanning a range of common statistical models. Additionally, we discuss the positive role of PyMC in the development of the open-source ecosystem for probabilistic programming.
PyMC是一个用于Python的概率编程库,它提供了构建和拟合贝叶斯模型的工具。它提供了一种直观、可读的语法,与统计学家用于描述模型的自然语法相近。PyMC利用符号计算库PyTensor,使其能够编译成各种计算后端,如C、JAX和Numba,这些后端又提供了对包括CPU、GPU和TPU在内的不同计算架构的访问。作为一个通用的建模框架,PyMC支持各种模型,包括广义分层线性回归和分类、时间序列、常微分方程(ODE)以及非参数模型,如高斯过程(GP)。我们通过一系列常见统计模型的示例展示了PyMC的通用性和易用性。此外,我们还讨论了PyMC在概率编程开源生态系统发展中的积极作用。