简体   繁体   English

内置模块用于Python中的贝叶斯曲线拟合

[英]Built-in module for bayesian curve fitting in python

I was searching scipy library for any built in modules for Bayesian curve fitting and I'm not able to find one. 我正在scipy库中搜索任何用于贝叶斯曲线拟合的内置模块,但找不到。 All I found is : scipy.optimize.curve_fit 我发现的是: scipy.optimize.curve_fit

But the description of this link says that this is non linear least squares fit. 但是此链接的描述说这是非线性最小二乘拟合。 My question is - do we have to implement our own module for Bayesian curve fitting or is there any such module that I might have missed? 我的问题是-我们必须为贝叶斯曲线拟合实现自己的模块,还是我可能会错过的模块?

Bayesian inference is not part of the SciPy library - it is simply out of scope for scipy . 贝叶斯推理不是SciPy库的一部分-它根本不在scipy的范围内。 There is a number of separate python modules that deal with it, and it seems that you have indeed missed quite a few of those - most notably implementations of Markov chain Monte Carlo algorithms pymc and emcee that are probably the most used MCMC packages. 有很多单独的python模块可以处理它,似乎您确实错过了其中的很多-最著名的是Markov链蒙特卡洛算法pymcemcee ,它们可能是使用最多的MCMC软件包。 They are both relatively straightforward to set up, but in my opinion emcee is easier to get started with. 它们都相对容易设置,但是我认为emcee更容易上手。

As with everything, the devil is in the details with Bayesian curve fitting - I highly recommend reading through this overview to get a feel of subtleties of line fitting. 与所有内容一样,使用贝叶斯曲线拟合的细节在于细节-我强烈建议您通读此概述 ,以感觉到线条拟合的精妙之处。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM