arXiv:2601.20120cs.LGstat.ME2026-01

用PyMC重实现Prophet,对比多种贝叶斯推断方法在时间序列预测中的表现

Going NUTS with ADVI: Exploring various Bayesian Inference techniques with Facebook Prophet

  • 在PyMC中重写Prophet,支持自定义建模与多种推断方法
  • 对比了MCMC、MAP和变分推断在预测精度与计算效率上的差异
  • 适合研究贝叶斯时间序列建模或想灵活使用不同推断方法的开发者

自发布以来,Facebook Prophet 在经典统计学与贝叶斯统计领域均获得积极关注。该模型提供两种内置推断方法:基于L-BFGS-B算法的最大后验估计(MAP),以及通过无须转弯采样器(NUTS)的马尔可夫链蒙特卡洛(MCMC)采样。然而,在使用Prophet进行贝叶斯推断时,我们发现其无法应用除默认方法外的其他推断技术,且其流畅的API设计不足以支持自定义建模需求。为解决这些问题,我们基于PyMC完全重写了Prophet模型,实现了对基础模型的扩展,并能评估与比较多种贝叶斯推断方法。本文详细介绍了基于PyMC的实现,分析了全量MCMC、MAP估计及变分推断在时间序列预测任务中的实现细节,涵盖采样策略、收敛诊断、预测指标、计算效率,并识别出未来工作需解决的问题。

原文摘要 · Abstract (English)

Since its introduction, Facebook Prophet has attracted positive attention from both classical statisticians and the Bayesian statistics community. The model provides two built-in inference methods: maximum a posteriori estimation using the L-BFGS-B algorithm, and Markov Chain Monte Carlo (MCMC) sampling via the No-U-Turn Sampler (NUTS). While exploring various time-series forecasting problems using Bayesian inference with Prophet, we encountered limitations stemming from the inability to apply alternative inference techniques beyond those provided by default. Additionally, the fluent API design of Facebook Prophet proved insufficiently flexible for implementing our custom modeling ideas. To address these shortcomings, we developed a complete reimplementation of the Prophet model in PyMC, which enables us to extend the base model and evaluate and compare multiple Bayesian inference methods. In this paper, we present our PyMC-based implementation and analyze in detail the implementation of different Bayesian inference techniques. We consider full MCMC techniques, MAP estimation and Variational inference techniques on a time-series forecasting problem. We discuss in details the sampling approach, convergence diagnostics, forecasting metrics as well as their computational efficiency and detect possible issues which will be addressed in our future work.

时间序列贝叶斯推断PyMCMCMC

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。