PyMC3
PyMC3是一个Python包,用于贝叶斯统计建模和概率机器学习,它聚焦于高级马尔可夫链蒙特卡洛法和变分拟合算法[1][2][3]。它是从以前版本的PyMC软件从头开始写成的[4]。
原作者 | PyMC3开发团队 |
---|---|
初始版本 | 2013年5月4日 |
穩定版本 | 3.10 (2020年12月7日 ) |
编程语言 | Python |
操作系统 | 类Unix, Mac OS X, Microsoft Windows |
系統平台 | Intel x86 – 32-bit, x64 |
类型 | 统计包 |
许可协议 | Apache License, Version 2.0 |
网站 | pymc-devs |
概述
不同于使用Fortran扩展进行计算的PyMC2,PyMC3依靠Theano来自动微分,还有计算优化和动态C编译[2][5]。从版本3.8开始PyMC3依据ArviZ来处理绘图、分析和统计检查。PyMC3和Stan是两个最流行的概率编程工具[6]。
PyMC3是开源项目,由社区开发并在财务上得到NumFocus赞助[7]。PyMC3已经在很多领域中被用于解决推断问题,包括天文学[8][9]、流行病学[10][11]、分子生物学[12]、晶体学[13][14]、化学[15]、生态学[16][17]和心理学[18]。
在Theano于2017年宣布计划停止开发之后[19],PyMC3团队评估采用TensorFlow Probability作为计算后端[20],但是在2020年决定接管Theano的开发[21]。在2021年1月绝大部份的Theano-PyMC代码基被重造并增加了通过JAX编译[22]。PyMC团队计划以新名字发行修订后的计算后端并继续开发PyMC3[23]。
推论引擎
PyMC3实现了不基于梯度的和基于梯度的马尔可夫链蒙特卡洛(MCMC)算法用于贝叶斯推断和随机(Stochastic),基于梯度的变分贝叶斯方法用于近似贝叶斯推断。
- MCMC算法:
- No-U-Turn采样(NUTS)[24],是哈密顿蒙特卡洛的变体和PyMC3用于连续变量的缺省引擎。
- 梅特罗波利斯-黑斯廷斯算法,是PyMC3用于离散变量的缺省引擎。
- 顺序蒙特卡洛算法。
- 变分推断算法:
- 黑箱变分推断[25]。
参见
- Stan是用C++编写统计推论的概率编程语言。
引用
- Salvatier J, Wiecki TV, Fonnesbeck C. (2016) Probabilistic programming in Python using PyMC3. PeerJ Computer Science 2:e55 https://doi.org/10.7717/peerj-cs.55
- Martin, Osvaldo. . Packt Publishing Ltd. 2016: 31–60 [16 September 2017]. ISBN 9781785889851 (英语).
- Davidson-Pilon, Cameron. . Addison-Wesley Professional. 2015-09-30. ISBN 9780133902921 (英语).
- . docs.pymc.io. [2017-09-20]. (原始内容存档于2018-11-18) (英语).
- Hilpisch, Yves. . O'Reilly Media, Inc. 2014-12-11. ISBN 9781491945391 (英语).
- . [2017-03-10]. (原始内容存档于2021-01-29).
- . NumFOCUS | Open Code = Better Science. [2017-03-10]. (原始内容存档于2017-09-21).
- Greiner, J.; Burgess, J. M.; Savchenko, V.; Yu, H.-F. . The Astrophysical Journal Letters. 2016, 827 (2): L38. Bibcode:2016ApJ...827L..38G. ISSN 2041-8205. arXiv:1606.00314. doi:10.3847/2041-8205/827/2/L38 (英语).
- Hilbe, Joseph M.; Souza, Rafael S. de; Ishida, Emille E. O. . Cambridge University Press. 2017-04-30 [2021-01-20]. ISBN 9781108210744. (原始内容存档于2021-02-03) (英语).
- Brauner, Jan M.; Mindermann, Sören; Sharma, Mrinank; Johnston, David; Salvatier, John; Gavenčiak, Tom; Stephenson, Anna B.; Leech, Gavin; Altman, George; Mikulik, Vladimir; Norman, Alexander John; Monrad, Joshua Teperowski; Besiroglu, Tamay; Ge, Hong; Hartwick, Meghan A.; Teh, Yee Whye; Chindelevitch, Leonid; Gal, Yarin; Kulveit, Jan. . Science. 2020-12-15 [2021-01-20]. doi:10.1126/science.abd9338. (原始内容存档于2021-02-07).
- Systrom, Kevin; Vladek, Thomas; Krieger, Mike. . Rt.live. [10 January 2021]. (原始内容存档于2021-01-06).
- Wagner, Stacey D.; Struck, Adam J.; Gupta, Riti; Farnsworth, Dylan R.; Mahady, Amy E.; Eichinger, Katy; Thornton, Charles A.; Wang, Eric T.; Berglund, J. Andrew. . PLOS Genetics. 2016-09-28, 12 (9): e1006316. ISSN 1553-7404. PMC 5082313. PMID 27681373. doi:10.1371/journal.pgen.1006316.
- Sharma, Amit; Johansson, Linda; Dunevall, Elin; Wahlgren, Weixiao Y.; Neutze, Richard; Katona, Gergely. . Acta Crystallographica Section A. 2017-03-01, 73 (2): 93–101. ISSN 2053-2733. PMC 5332129. PMID 28248658. doi:10.1107/s2053273316018696 (英语).
- Katona, Gergely; Garcia-Bonete, Maria-Jose; Lundholm, Ida. . Acta Crystallographica Section A. 2016-05-01, 72 (3): 406–411. ISSN 2053-2733. PMC 4850660. PMID 27126118. doi:10.1107/S2053273316003430 (英语).
- Garay, Pablo G.; Martin, Osvaldo A.; Scheraga, Harold A.; Vila, Jorge A. . PeerJ. 2016-07-21, 4: e2253. ISSN 2167-8359. PMC 4963218. PMID 27547559. doi:10.7717/peerj.2253 (英语).
- Wang, Yan; Huang, Hong; Huang, Lida; Ristic, Branko. . Atmospheric Environment. 2017, 152: 519–530. Bibcode:2017AtmEn.152..519W. doi:10.1016/j.atmosenv.2017.01.014.
- MacNeil, M. Aaron; Chong-Seng, Karen M.; Pratchett, Deborah J.; Thompson, Casssandra A.; Messmer, Vanessa; Pratchett, Morgan S. . Diversity. 2017-03-14, 9 (1): 18. doi:10.3390/d9010018 (英语).
- Tünnermann, Jan; Scharlau, Ingrid. . Frontiers in Psychology. 2016, 7. ISSN 1664-1078. PMC 5052275. PMID 27766086. doi:10.3389/fpsyg.2016.01442 (英语).
- Lamblin, Pascal. . theano-users (邮件列表). 28 September 2017 [28 September 2017]. (原始内容存档于2011-01-22).
- Developers, PyMC. . PyMC Developers. 2018-05-17 [2019-01-25]. (原始内容存档于2020-08-06).
- . PyMC Developers. [10 January 2021]. (原始内容存档于2021-01-15).
- Bradbury, James; Frostig, Roy; Hawkins, Peter; James, Matthew James; Leary, Chris; Maclaurin, Dougal; Necula, George; Paszke, Adam; VanderPlas, Jake; Wanderman-Milne, Skye; Zhang, Qiao. . [10 January 2021]. (原始内容存档于2021-02-05).
- . PyMC Timeline. [10 January 2021]. (原始内容存档于2018-05-20).
- Hoffman, Matthew D.; Gelman, Andrew. . Journal of Machine Learning Research. April 2014, 15: pp. 1593–1623 [2021-01-20]. (原始内容存档于2020-08-11).
- Kucukelbir, Alp; Ranganath, Rajesh; Blei, David M. 1506 (3431). June 2015. Bibcode:2015arXiv150603431K. arXiv:1506.03431.
延伸阅读
外部链接
- PyMC3 web site 页面存档备份,存于
- PyMC3 source 页面存档备份,存于, a Git repository hosted on GitHub
- PyMC4 source 页面存档备份,存于, for port to TensorFlow Probability
- Symbolic PyMC 页面存档备份,存于 is an experimental set of tools that facilitate sophisticated symbolic manipulation of PyMC models
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.