用于tex86校准的开源python包
baysparp的Python项目详细描述
用于tex86校准的开源python包。
这个包是基于原始贝叶斯(贝叶斯空间变化回归)的MATLAB(https://github.com/jesstierney/BAYSPAR)。
快速示例
首先,加载密钥包和示例数据集:
importnumpyasnpimportbaysparasbsrexample_file=bsr.get_example_data('castaneda2010.csv')d=np.genfromtxt(example_file,delimiter=',',names=True)
此数据集(来自Castañeda et al. 2010) 有两列给出了沉积年龄(日历年bp)和tex86。
我们可以用predict_seatemp():
prediction=bsr.predict_seatemp(d['tex86'],lon=34.0733,lat=31.6517,prior_std=6,temptype='sst')
要查看预测中的实际数字,请直接解析prediction.ensemble或使用prediction.percentile()获取5%、50%和95%的百分位数。
您还可以使用bsr.predictplot()或bsr.densityplot()绘制预测。
有关更多详细信息、示例和其他预测函数,请参阅联机文档(https://baysparpy.readthedocs.io)。
安装
要使用pip安装baysparpy,请运行:
$ pip install git+git://github.com/brews/baysparpy.git@stable
不幸的是,baysparpy与python 2不兼容。
支持和发展
- 文档可在线获取(https://baysparpy.readthedocs.io)。
- 请随时报告错误和问题,或查看github(https://github.com/brews/baysparpy)上的源代码。
许可证
baysparpy在开源gplv3(https://www.gnu.org/licenses)下可用。