<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=PyMC</id>
	<title>PyMC - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=PyMC"/>
	<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=PyMC&amp;action=history"/>
	<updated>2026-06-26T00:41:21Z</updated>
	<subtitle>在这个wiki上该页的修订历史</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://arolstar52-zhtest.hf.space/index.php?title=PyMC&amp;diff=3595260&amp;oldid=prev</id>
		<title>imported&gt;ExultantEditor 来自 2025年12月26日 (五) 17:59</title>
		<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=PyMC&amp;diff=3595260&amp;oldid=prev"/>
		<updated>2025-12-26T17:59:34Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Infobox software&lt;br /&gt;
| name                   = PyMC&lt;br /&gt;
| author                 = PyMC开发团队&lt;br /&gt;
| logo                   = File:PyMC logo.png&lt;br /&gt;
| logo size              = 260px&lt;br /&gt;
| released               = {{Start date|2013|05|04}}&lt;br /&gt;
| discontinued           =&lt;br /&gt;
| latest release version = {{wikidata|property|edit|reference|P348}}&lt;br /&gt;
| latest release date = {{wikidata|qualifier|P348|P577}}&lt;br /&gt;
| programming language   = [[Python]]&lt;br /&gt;
| operating system       = [[类Unix]], [[Mac OS X]], [[Microsoft Windows]]&lt;br /&gt;
| platform               = [[IA-32|Intel x86 – 32-bit]], [[x86-64|x64]]&lt;br /&gt;
| genre                  = {{le|统计软件列表|List of statistical software|统计包}}&lt;br /&gt;
| license                = [[Apache License| Apache License, Version 2.0]]&lt;br /&gt;
| repo                   = https://github.com/pymc-devs/pymc&lt;br /&gt;
| website                = {{URL|https://www.pymc.io/}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;PyMC&amp;#039;&amp;#039;&amp;#039;（曾叫做&amp;#039;&amp;#039;&amp;#039;PyMC3&amp;#039;&amp;#039;&amp;#039;&amp;lt;ref name=&amp;quot;timeline&amp;quot;/&amp;gt;）是一个[[Python]]包，用于[[贝叶斯统计]][[概率模型|建模]]和[[贝叶斯概率|概率]][[机器学习]]，它聚焦于高级马尔可夫链蒙特卡洛法和变分拟合算法&amp;lt;ref&amp;gt;&lt;br /&gt;
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&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;Martin2016&amp;quot;&amp;gt;{{cite book|url=https://books.google.com/?id=t6PcDgAAQBAJ&amp;amp;dq=%22PyMC3%22|title=Bayesian Analysis with Python|last1=Martin|first1=Osvaldo|date=2016|publisher=Packt Publishing Ltd|isbn=9781785889851|pages=31–60|language=en|access-date=16 September 2017}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite book|url=https://books.google.com/books?id=rMKiCgAAQBAJ|title=Bayesian Methods for Hackers: Probabilistic Programming and Bayesian Inference|last=Davidson-Pilon|first=Cameron|date=2015-09-30|publisher=Addison-Wesley Professional|isbn=9780133902921|language=en}}&lt;br /&gt;
&amp;lt;/ref&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
==概述==&lt;br /&gt;
PyMC曾经叫做PyMC3，不同于早先的使用[[Fortran]]扩展进行计算的PyMC2，它依靠[[Theano]]来进行[[自动微分]]、计算优化和动态[[C语言|C]]语言编译&amp;lt;ref name=&amp;quot;Martin2016&amp;quot; /&amp;gt;&amp;lt;ref&amp;gt;&lt;br /&gt;
{{Cite book|url=https://books.google.com/books?id=E93SBQAAQBAJ&amp;amp;pg=PA342&amp;amp;dq=PyMC3|title=Python for Finance: Analyze Big Financial Data|last=Hilpisch|first=Yves|date=2014-12-11|publisher=O&amp;#039;Reilly Media, Inc.|isbn=9781491945391|language=en}}&lt;br /&gt;
&amp;lt;/ref&amp;gt;。从版本3.8开始PyMC依据{{le|ArviZ}}来进行[[数据可视化]]和[[贝叶斯推断]]的{{le|探索数据分析|Exploratory data analysis|探索分析}}&amp;lt;ref&amp;gt;{{cite web|url=https://python.arviz.org/en/latest/index.html|title=ArviZ — Exploratory analysis of Bayesian models|access-date=2023-09-21|archive-date=2023-10-11|archive-url=https://web.archive.org/web/20231011015435/https://python.arviz.org/en/latest/index.html|dead-url=no}}&amp;lt;/ref&amp;gt;。PyMC和{{le|Stan (软件)|Stan (software)|Stan}}是两个最流行的[[概率编程]]工具&amp;lt;ref&amp;gt;{{Cite web|url=http://blog.fastforwardlabs.com/2017/01/30/the-algorithms-behind-probabilistic-programming.html|title=The Algorithms Behind Probabilistic Programming|access-date=2017-03-10|archive-date=2021-01-29|archive-url=https://web.archive.org/web/20210129014013/https://blog.fastforwardlabs.com/2017/01/30/the-algorithms-behind-probabilistic-programming.html|dead-url=no}}&amp;lt;/ref&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
PyMC是[[开源软件|开源]]项目，由社区开发并在财务上得到NumFocus赞助&amp;lt;ref&amp;gt;{{Cite news|url=http://www.numfocus.org/blog/numfocus-announces-new-fiscally-sponsored-project-pymc3|title=NumFOCUS Announces New Fiscally Sponsored Project: PyMC3|work=NumFOCUS {{!}} Open Code = Better Science|access-date=2017-03-10|archive-date=2017-09-21|archive-url=https://web.archive.org/web/20170921144216/https://www.numfocus.org/blog/numfocus-announces-new-fiscally-sponsored-project-pymc3/|dead-url=no}}&amp;lt;/ref&amp;gt;。PyMC已经在很多领域中被用于解决推断问题，包括[[天文学]]&amp;lt;ref&amp;gt;&lt;br /&gt;
{{Cite journal|last=Greiner|first=J.|last2=Burgess|first2=J. M.|last3=Savchenko|first3=V.|last4=Yu|first4=H.-F.|date=2016|title=On the Fermi-GBM Event 0.4 s after GW150914|url=http://stacks.iop.org/2041-8205/827/i=2/a=L38|journal=The Astrophysical Journal Letters|language=en|volume=827|issue=2|pages=L38|doi=10.3847/2041-8205/827/2/L38|issn=2041-8205|arxiv=1606.00314|bibcode=2016ApJ...827L..38G}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite book|url=https://books.google.com/books?id=7D2wDgAAQBAJ&amp;amp;pg=PA161&amp;amp;dq=PyMC3|title=Bayesian Models for Astrophysical Data: Using R, JAGS, Python, and Stan|last=Hilbe|first=Joseph M.|last2=Souza|first2=Rafael S. de|last3=Ishida|first3=Emille E. O.|date=2017-04-30|publisher=Cambridge University Press|isbn=9781108210744|language=en|access-date=2021-01-20|archive-date=2021-02-03|archive-url=https://web.archive.org/web/20210203131600/https://books.google.com/books?id=7D2wDgAAQBAJ&amp;amp;pg=PA161&amp;amp;dq=PyMC3|dead-url=no}}&amp;lt;/ref&amp;gt;、[[流行病学]]&amp;lt;ref&amp;gt;{{cite journal |last1=Brauner |first1=Jan M. |last2=Mindermann |first2=Sören |last3=Sharma |first3=Mrinank |last4=Johnston |first4=David |last5=Salvatier |first5=John |last6=Gavenčiak |first6=Tom |last7=Stephenson |first7=Anna B. |last8=Leech |first8=Gavin |last9=Altman |first9=George |last10=Mikulik |first10=Vladimir |last11=Norman |first11=Alexander John |last12=Monrad |first12=Joshua Teperowski |last13=Besiroglu |first13=Tamay |last14=Ge |first14=Hong |last15=Hartwick |first15=Meghan A. |last16=Teh |first16=Yee Whye |last17=Chindelevitch |first17=Leonid |last18=Gal |first18=Yarin |last19=Kulveit |first19=Jan |title=Inferring the effectiveness of government interventions against COVID-19 |journal=Science |date=2020-12-15 |doi=10.1126/science.abd9338 |url=https://science.sciencemag.org/content/early/2020/12/15/science.abd9338 |access-date=2021-01-20 |archive-date=2021-02-07 |archive-url=https://web.archive.org/web/20210207102002/https://science.sciencemag.org/content/early/2020/12/15/science.abd9338 |dead-url=no }}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite web |last1=Systrom |first1=Kevin |last2=Vladek |first2=Thomas |last3=Krieger |first3=Mike |title=Rt.live Github repository |url=https://github.com/rtcovidlive/covid-model |website=Rt.live |access-date=10 January 2021 |archive-date=2021-01-06 |archive-url=https://web.archive.org/web/20210106182426/https://github.com/rtcovidlive/covid-model |dead-url=no }}&amp;lt;/ref&amp;gt;、[[分子生物学]]&amp;lt;ref&amp;gt;&lt;br /&gt;
{{Cite journal|last=Wagner|first=Stacey D.|last2=Struck|first2=Adam J.|last3=Gupta|first3=Riti|last4=Farnsworth|first4=Dylan R.|last5=Mahady|first5=Amy E.|last6=Eichinger|first6=Katy|last7=Thornton|first7=Charles A.|last8=Wang|first8=Eric T.|last9=Berglund|first9=J. Andrew|date=2016-09-28|title=Dose-Dependent Regulation of Alternative Splicing by MBNL Proteins Reveals Biomarkers for Myotonic Dystrophy|journal=PLOS Genetics|volume=12|issue=9|pages=e1006316|doi=10.1371/journal.pgen.1006316|pmid=27681373|pmc=5082313|issn=1553-7404}}&lt;br /&gt;
&amp;lt;/ref&amp;gt;、[[晶体学]]&amp;lt;ref&amp;gt;&lt;br /&gt;
{{Cite journal|last=Sharma|first=Amit|last2=Johansson|first2=Linda|last3=Dunevall|first3=Elin|last4=Wahlgren|first4=Weixiao Y.|last5=Neutze|first5=Richard|last6=Katona|first6=Gergely|date=2017-03-01|title=Asymmetry in serial femtosecond crystallography data|journal=Acta Crystallographica Section A|language=en|volume=73|issue=2|pages=93–101|doi=10.1107/s2053273316018696|pmid=28248658|issn=2053-2733|pmc=5332129}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;&lt;br /&gt;
{{Cite journal|last=Katona|first=Gergely|last2=Garcia-Bonete|first2=Maria-Jose|last3=Lundholm|first3=Ida|date=2016-05-01|title=Estimating the difference between structure-factor amplitudes using multivariate Bayesian inference|journal=Acta Crystallographica Section A|language=en|volume=72|issue=3|pages=406–411|doi=10.1107/S2053273316003430|pmid=27126118|issn=2053-2733|pmc=4850660}}&lt;br /&gt;
&amp;lt;/ref&amp;gt;、[[化学]]&amp;lt;ref&amp;gt;&lt;br /&gt;
{{Cite journal|last=Garay|first=Pablo G.|last2=Martin|first2=Osvaldo A.|last3=Scheraga|first3=Harold A.|last4=Vila|first4=Jorge A.|date=2016-07-21|title=Detection of methylation, acetylation and glycosylation of protein residues by monitoring13C chemical-shift changes: A quantum-chemical study|journal=PeerJ|language=en|volume=4|pages=e2253|doi=10.7717/peerj.2253|pmid=27547559|pmc=4963218|issn=2167-8359}}&lt;br /&gt;
&amp;lt;/ref&amp;gt;、[[生态学]]&amp;lt;ref&amp;gt;&lt;br /&gt;
{{Cite journal|last=Wang|first=Yan|last2=Huang|first2=Hong|last3=Huang|first3=Lida|last4=Ristic|first4=Branko|title=Evaluation of Bayesian source estimation methods with Prairie Grass observations and Gaussian plume model: A comparison of likelihood functions and distance measures|journal=Atmospheric Environment|volume=152|pages=519–530|doi=10.1016/j.atmosenv.2017.01.014|bibcode=2017AtmEn.152..519W|year=2017}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;&lt;br /&gt;
{{Cite journal|last=MacNeil|first=M. Aaron|last2=Chong-Seng|first2=Karen M.|last3=Pratchett|first3=Deborah J.|last4=Thompson|first4=Casssandra A.|last5=Messmer|first5=Vanessa|last6=Pratchett|first6=Morgan S.|date=2017-03-14|title=Age and Growth of An Outbreaking Acanthaster cf. solaris Population within the Great Barrier Reef|journal=Diversity|language=en|volume=9|issue=1|pages=18|doi=10.3390/d9010018}}&lt;br /&gt;
&amp;lt;/ref&amp;gt;和[[心理学]]&amp;lt;ref&amp;gt;&lt;br /&gt;
{{Cite journal|last=Tünnermann|first=Jan|last2=Scharlau|first2=Ingrid|date=2016|title=Peripheral Visual Cues: Their Fate in Processing and Effects on Attention and Temporal-Order Perception|journal=Frontiers in Psychology|language=en|volume=7|doi=10.3389/fpsyg.2016.01442|pmid=27766086|issn=1664-1078|pmc=5052275}}&amp;lt;/ref&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
在[[Theano]]于2017年宣布计划停止开发之后&amp;lt;ref&amp;gt;{{cite mailing list|url=https://groups.google.com/forum/#!topic/theano-users/7Poq8BZutbY|title=MILA and the future of Theano|date=28 September 2017|mailing-list=theano-users|last=Lamblin|first=Pascal|access-date=28 September 2017|archive-date=2011-01-22|archive-url=http://arquivo.pt/wayback/20110122130054/https://groups.google.com/forum/#!topic/theano-users/7Poq8BZutbY|dead-url=no}}&amp;lt;/ref&amp;gt;，PyMC团队曾评估采用TensorFlow Probability&amp;lt;ref&amp;gt;{{cite web|url=https://www.tensorflow.org/probability|title=TensorFlow Probability is a library for probabilistic reasoning and statistical analysis|access-date=2022-08-31|archive-date=2022-09-04|archive-url=https://web.archive.org/web/20220904053357/https://www.tensorflow.org/probability|dead-url=no}}&amp;lt;/ref&amp;gt;作为计算后端&amp;lt;ref&amp;gt;{{Cite web|url=https://medium.com/@pymc_devs/theano-tensorflow-and-the-future-of-pymc-6c9987bb19d5|title=Theano, TensorFlow and the Future of PyMC|last=Developers|first=PyMC|date=2018-05-17|website=PyMC Developers|access-date=2019-01-25|archive-date=2020-08-06|archive-url=https://web.archive.org/web/20200806150843/https://medium.com/@pymc_devs/theano-tensorflow-and-the-future-of-pymc-6c9987bb19d5|dead-url=no}}&amp;lt;/ref&amp;gt;，但是在2020年接管Theano的开发&amp;lt;ref&amp;gt;{{cite web |title=The Future of PyMC3, or: Theano is Dead, Long Live Theano |url=https://pymc-devs.medium.com/the-future-of-pymc3-or-theano-is-dead-long-live-theano-d8005f8a0e9b |website=PyMC Developers |access-date=10 January 2021 |archive-date=2021-01-15 |archive-url=https://web.archive.org/web/20210115104613/https://pymc-devs.medium.com/the-future-of-pymc3-or-theano-is-dead-long-live-theano-d8005f8a0e9b |dead-url=no }}&amp;lt;/ref&amp;gt;。在2021年1月绝大部份的Theano代码基被重新建造，并增加了通过[[JAX]]和[[Numba]]的编译，修订后的这个计算后端以新名字Aesara发行。PyMC团队在2021年6月将PyMC3更名为PyMC&amp;lt;ref name=&amp;quot;timeline&amp;quot;&amp;gt;{{cite web |title=PyMC Timeline |url=https://github.com/pymc-devs/pymc3/wiki/Timeline |website=PyMC Timeline |access-date=2021-01-20 |archive-date=2018-05-20 |archive-url=https://web.archive.org/web/20180520095925/https://github.com/pymc-devs/pymc3/wiki/Timeline |dead-url=no }}&amp;lt;/ref&amp;gt;。2022年11月28日，PyMC团队宣布采用从Aesara计划分叉出PyTensor&amp;lt;ref&amp;gt;{{cite web|url=https://www.pymc.io/blog/pytensor_announcement.html#pytensor_announcement|title=PyMC forked Aesara to PyTensor|access-date=2023-08-17|archive-date=2023-07-18|archive-url=https://web.archive.org/web/20230718090637/https://www.pymc.io/blog/pytensor_announcement.html#pytensor_announcement|dead-url=no}}&amp;lt;/ref&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
== 推论引擎 ==&lt;br /&gt;
PyMC实现了不基于梯度的和基于梯度的[[马尔可夫链蒙特卡洛]]（MCMC）算法用于[[贝叶斯推断]]和随机（{{le|Stochastic|}}），基于梯度的[[变分贝叶斯方法]]用于近似贝叶斯推断。&lt;br /&gt;
* MCMC算法：&lt;br /&gt;
** No-U-Turn采样（NUTS）&amp;lt;ref name=&amp;quot;NUTS2014&amp;quot;&amp;gt;{{cite journal&lt;br /&gt;
 |last1        = Hoffman&lt;br /&gt;
 |first1       = Matthew D.&lt;br /&gt;
 |last2        = Gelman&lt;br /&gt;
 |first2       = Andrew&lt;br /&gt;
 |title        = The No-U-Turn Sampler: Adaptively Setting Path Lengths in Hamiltonian Monte Carlo&lt;br /&gt;
 |journal      = [[Journal of Machine Learning Research]]&lt;br /&gt;
 |date         = April 2014&lt;br /&gt;
 |volume       = 15&lt;br /&gt;
 |pages        = &amp;#039;&amp;#039;pp.&amp;#039;&amp;#039; 1593&amp;amp;ndash;1623&lt;br /&gt;
 |url          = http://jmlr.org/papers/v15/hoffman14a.html&lt;br /&gt;
 |access-date  = 2021-01-20&lt;br /&gt;
 |archive-date = 2020-08-11&lt;br /&gt;
 |archive-url  = https://web.archive.org/web/20200811003613/https://jmlr.org/papers/v15/hoffman14a.html&lt;br /&gt;
 |dead-url     = no&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;，是{{le|哈密顿蒙特卡洛|Hamiltonian Monte Carlo}}的变体和PyMC3用于连续变量的缺省引擎。&lt;br /&gt;
** [[梅特罗波利斯-黑斯廷斯算法]]，是PyMC3用于离散变量的缺省引擎。&lt;br /&gt;
** 顺序蒙特卡洛算法。 &lt;br /&gt;
* 变分推断算法：&lt;br /&gt;
** 黑箱变分推断&amp;lt;ref name=&amp;quot;kucukelbir20153&amp;quot;&amp;gt;&lt;br /&gt;
{{cite journal |last1 = Kucukelbir|first1 = Alp|last2 = Ranganath|first2 = Rajesh|last3 = Blei|first3 = David M.|title = Automatic Variational Inference in Stan|date = June 2015|volume = 1506|issue = 3431|arxiv = 1506.03431|bibcode = 2015arXiv150603431K}}&amp;lt;/ref&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
==参见==&lt;br /&gt;
*{{le|Stan (软件)|Stan (software)|Stan}}是用C++编写统计推论的概率编程语言。&lt;br /&gt;
&lt;br /&gt;
== 引用 ==&lt;br /&gt;
{{reflist|30em}}&lt;br /&gt;
&lt;br /&gt;
== 延伸阅读 ==&lt;br /&gt;
* [https://camdavidsonpilon.github.io/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/ Probabilistic Programming and Bayesian Methods for Hackers] {{Wayback|url=https://camdavidsonpilon.github.io/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/ |date=20210112023240 }}&lt;br /&gt;
* [http://people.duke.edu/~ccc14/sta-663-2016/16C_PyMC3.html Computational Statistics in Python] {{Wayback|url=http://people.duke.edu/~ccc14/sta-663-2016/16C_PyMC3.html |date=20210128073119 }}&lt;br /&gt;
&lt;br /&gt;
== 外部链接 ==&lt;br /&gt;
* [https://www.pymc.io/welcome.html PyMC web site] {{Wayback|url=https://www.pymc.io/welcome.html |date=20220712180939 }}&lt;br /&gt;
* [https://github.com/pymc-devs/pymc PyMC source] {{Wayback|url=https://github.com/pymc-devs/pymc |date=20220902231958 }}, a [[Git (software)|Git]] repository hosted on [[GitHub]]&lt;br /&gt;
* [https://github.com/pymc-devs/symbolic-pymc Symbolic PyMC] {{Wayback|url=https://github.com/pymc-devs/symbolic-pymc |date=20201212010805 }} is an experimental set of tools that facilitate sophisticated symbolic manipulation of PyMC models&lt;br /&gt;
&lt;br /&gt;
{{统计分析软件}}&lt;br /&gt;
&lt;br /&gt;
[[Category:计算统计学]]&lt;br /&gt;
[[Category:贝叶斯统计]]&lt;br /&gt;
[[Category:蒙地卡罗方法]]&lt;br /&gt;
[[Category:数值分析语言]]&lt;br /&gt;
[[Category:数学软件]]&lt;br /&gt;
[[Category:Python科学库]]&lt;/div&gt;</summary>
		<author><name>imported&gt;ExultantEditor</name></author>
	</entry>
</feed>