Project developed under the guidance of Professor Carlo Albert (Eawag), for the unit "Laboratory of Computational Physics - module B" in the Physics of Data Master's Degree at the University of Padua, spring 2023.
Bayesian inference was performed on the solar dynamo model parameters, by using collected data on the number of sunspots, which follow the 11-year solar cycle.
Given a model with parameters
Bayes' theorem is written as:
where
The posterior distribution
In Bayesian inference, we will want to compute expectation values of functions with respect to the posterior probability distribution. Given a function
This integral is typically too complex to solve analytically, so we resort to sampling methods that enable to compute the integral as a sum over the
Markov Chain Monte Carlo (MCMC) is a family of algorithms that allow sampling from complex distributions. The main idea of MCMC is to generate a Markov Chain whose equilibrium distribution resembles the target distribution.
The solar dynamo model is represented by the following second order ODE:
The observable data is the intensity of the solar magnetic field,
The workflow is as follows:
- initialize values for model parameters (i.e. taken from the previously mentioned paper)
- simulate the model by using the Stochastic Delay Differential Equations (SDDE) solver package in Julia (SDDE.jl in the repo)
- construct the posterior with the data (real or simulated)
- sample the posterior by means of the EMCEE sampler package in python
- construct credibility intervals for the parameters and compare with initial values
- tweak simulation and EMCEE sampler
When using real data, skip directly to step 3.
All the code is contained in the Solar_Dynamo_Notebook jupyter notebook file in the repo.