BayesicFitting, a PYTHON toolbox for Bayesian fitting and evidence calculation.: Including a Nested Sampling implementation

BayesicFitting is a comprehensive, general-purpose toolbox for simple and standardized model fitting. Its fitting options range from simple least-squares methods, via maximum likelihood to fully Bayesian inference, working on a multitude of available models. BayesicFitting is open source and has been in development and use since the 1990s. It has been applied to a variety of science applications, chiefly in astronomy. BayesicFitting consists of a collection of PYTHON classes that can be combined to solve quite complicated inference problems. Amongst the classes are models, fitters, priors, error distributions, engines, samples, and of course NestedSampler, our generalpurpose implementation of the nested sampling algorithm. Nested sampling is a novel way to perform Bayesian calculations. It can be applied to inference problems, that consist of a parameterized model to fit measured data to. NestedSampler calculates the Bayesian evidence as the numeric integral over the posterior probability of (hyper)parameters of the problem. The solution in terms of the parameters is obtained as a set of weighted samples drawn from the posterior. In this paper, we emphasize nested sampling and all classes that are directly connected to it. Additionally, we present the fitters, which fit the data by the least-squares method or the maximum likelihood method. They can also calculate the Bayesian evidence as a Gaussian approximation. We will discuss the architecture of the toolbox. Which classes are present, what is their function, how they are related and implementational details where it gets complicated.

[1]  Abubakr Gafar Abdalla,et al.  Probability Theory , 2017, Encyclopedia of GIS.

[2]  Andrew Thomas,et al.  The BUGS project: Evolution, critique and future directions , 2009, Statistics in medicine.

[3]  Radford M. Neal Pattern Recognition and Machine Learning , 2007, Technometrics.

[4]  R. Paul Butler,et al.  Four New Planets Orbiting Metal-enriched Stars* , 2002 .

[5]  S. Gull Bayesian Inductive Inference and Maximum Entropy , 1988 .

[6]  P. Alam ‘S’ , 2021, Composites Engineering: An A–Z Guide.

[7]  D. J. M. Kester,et al.  SWS fringes and models , 2003 .

[8]  J. Vince Straight Lines , 2021, Vector Analysis for Computer Graphics.

[9]  Joel Nothman,et al.  SciPy 1.0-Fundamental Algorithms for Scientific Computing in Python , 2019, ArXiv.

[10]  Miguel de Val-Borro,et al.  The Astropy Project: Building an Open-science Project and Status of the v2.0 Core Package , 2018, The Astronomical Journal.

[11]  Donald L. Kester The Ball Is Round , 2011 .

[12]  P. Alam ‘A’ , 2021, Composites Engineering: An A–Z Guide.

[13]  D. Teyssier,et al.  Correction of electric standing waves , 2014 .

[14]  J. Skilling Bayesian computation in big spaces-nested sampling and Galilean Monte Carlo , 2012 .

[15]  F. A. Seiler,et al.  Numerical Recipes in C: The Art of Scientific Computing , 1989 .

[16]  Johannes Buchner,et al.  Bayesian X-ray Analysis (BXA) v4.0 , 2021, J. Open Source Softw..

[17]  L. Shields The logic of science. , 2007, Paediatric nursing.

[18]  K. Edwards,et al.  The data processing pipeline for the Herschel1 - HIFI instrument , 2019, Astron. Comput..

[19]  J. Skilling Nested sampling for general Bayesian computation , 2006 .

[20]  John Skilling,et al.  Scheduling for Schools , 2006 .

[21]  D. Kester Improving the SWS Spectrum of Titan. Correcting for the reset pulse aftermath. , 2000 .

[22]  V. Ossenkopf,et al.  Data processing pipeline for Herschel HIFI , 2017, 1709.04327.

[23]  P. Gregory Bayesian Logical Data Analysis for the Physical Sciences: Multivariate Gaussian from maximum entropy , 2005 .

[24]  A C C Gibbs,et al.  Data Analysis , 2009, Encyclopedia of Database Systems.

[25]  Martin F. Kessler,et al.  The calibration legacy of the ISO Mission , 2003 .

[26]  R Core Team,et al.  R: A language and environment for statistical computing. , 2014 .

[27]  K. Jarrod Millman,et al.  Array programming with NumPy , 2020, Nat..

[28]  Daniel Foreman-Mackey,et al.  emcee: The MCMC Hammer , 2012, 1202.3665.

[29]  A. Lasenby,et al.  polychord: next-generation nested sampling , 2015, 1506.00171.

[30]  A. F.,et al.  A Source Book in Physics , 1935, Nature.

[31]  P. Alam ‘O’ , 2021, Composites Engineering: An A–Z Guide.

[32]  Stephan Ott,et al.  The Herschel Data Processing System - HIPE and Pipelines - Up and Running Since the Start of the Mission , 2010, 1011.1209.

[33]  K. Arnaud XSPEC: The First Ten Years , 1996 .

[34]  D. Kester,et al.  Darwinian Model Building , 2011 .